com.itmill.toolkit.terminal.web
Class HttpVariableMap

java.lang.Object
  extended by com.itmill.toolkit.terminal.web.HttpVariableMap

public class HttpVariableMap
extends Object

Class implementing the variable mappings.

Since:
3.0
Version:
4.1.4
Author:
IT Mill Ltd.

Nested Class Summary
 class HttpVariableMap.TerminalErrorImpl
          Implementation of VariableOwner.Error interface.
 class HttpVariableMap.VariableOwnerErrorImpl
          Implementation of VariableOwner.Error interface.
 
Constructor Summary
HttpVariableMap()
           
 
Method Summary
 Map handleVariables(HttpServletRequest req, Terminal.ErrorListener errorListener)
          Handles all variable changes in this request.
 String registerVariable(String name, Class type, Object value, VariableOwner owner)
          Registers a new variable.
 void unregisterVariable(String name, VariableOwner owner)
          Unregisters the variable.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HttpVariableMap

public HttpVariableMap()
Method Detail

registerVariable

public String registerVariable(String name,
                               Class type,
                               Object value,
                               VariableOwner owner)
Registers a new variable.

Parameters:
name - the name of the variable.
type -
value -
owner - the Listener for variable changes.
Returns:
id to assigned for this variable.

unregisterVariable

public void unregisterVariable(String name,
                               VariableOwner owner)
Unregisters the variable.

Parameters:
name - the name of the variable.
owner - the Listener for variable changes.

handleVariables

public Map handleVariables(HttpServletRequest req,
                           Terminal.ErrorListener errorListener)
                    throws IOException
Handles all variable changes in this request.

Parameters:
req - the Http request to handle.
errorListener - If the list is non null, only the listed listeners are served. Otherwise all the listeners are served.
Returns:
Name to Value[] mapping of unhandled variables.
Throws:
IOException - if the writing failed due to input/output error.


Copyright © 2000-2008 IT Mill Ltd. All Rights Reserved.