Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## nextapp.echo2.webcontainer
Class ContainerInstance

    java.lang.Object
      nextapp.echo2.webrender.UserInstance
          nextapp.echo2.webcontainer.ContainerInstance

All Implemented Interfaces:
  java.io.Serializable

    public class ContainerInstance

extends UserInstance

Web application container user instance.

See Also:
  Serialized Form

Field Summary

Fields inherited from class nextapp.echo2.webrender.UserInstance
`PROPERTY_CLIENT_CONFIGURATION, PROPERTY_SERVER_DELAY_MESSAGE`

Method Summary
`ApplicationInstance` | `getApplicationInstance()` Returns the corresponding `ApplicationInstance` for this user instance.
`int` | `getCallbackInterval()` Determines the application-specified asynchronous monitoring service callback interval.
`Component` | `getComponentByElementId(java.lang.String elementId)` Retrieves the `Component` with the specified element id.
`static java.lang.String` | `getElementId(Component component)` Returns the base HTML element id that should be used when rendering the specified `Component`.
`IdTable` | `getIdTable()` Retrieves the `IdTable` used by this `ContainerInstance` to assign weakly-referenced unique identifiers to arbitrary objects.
`java.util.Map` | `getInitialRequestParameterMap()` Returns an immutable `Map` containing the HTTP form parameters sent on the initial request to the application.
`RenderState` | `getRenderState(Component component)` Retrieves the `RenderState` of the specified `Component`.
`UpdateManager` | `getUpdateManager()` Convenience method to retrieve the application's `UpdateManager`, which is used to synchronize client and server states.
`void` | `init(Connection conn)` Initializes the `ContainerInstance`, creating an instance of the target `ApplicationInstance` and initializing the state of the application.
`static void` | `newInstance(Connection conn)` Creates a new Web Application Container instance using the provided client `Connection`.
`void` | `removeRenderState(Component component)` Removes the `RenderState` of the specified `Component`.
`void` | `setRenderState(Component component, RenderState renderState)` Sets the `RenderState` of the specified `Component`.
`void` | `setTaskQueueCallbackInterval(TaskQueueHandle taskQueue, int ms)` Sets the interval between asynchronous callbacks from the client to check for queued tasks for a given `TaskQueue`.

Methods inherited from class nextapp.echo2.webrender.UserInstance
`getCharacterEncoding, getClientConfiguration, getClientProperties, getServerDelayMessage, getServiceUri, getServiceUri, getServletUri, getSession, getUserInstanceUpdateManager, sessionDidActivate, sessionWillPassivate, setClientConfiguration, setServerDelayMessage, valueBound, valueUnbound`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Method Detail

### getElementId

    public static java.lang.String getElementId(Component component)

  Returns the base HTML element id that should be used when rendering the specified `Component`.

  Parameters:
    `component` - the component
  Returns:
    the base HTML element id

### newInstance

    public static void newInstance(Connection conn)

  Creates a new Web Application Container instance using the provided client `Connection`. The instance will automatically be stored in the relevant `HttpSession`

  Parameters:
    `conn` - the client/server `Connection` for which the instance is being instantiated

### getApplicationInstance

    public ApplicationInstance getApplicationInstance()

  Returns the corresponding `ApplicationInstance` for this user instance.

  Returns:
    the relevant `ApplicationInstance`

### getCallbackInterval

    public int getCallbackInterval()

  Determines the application-specified asynchronous monitoring service callback interval.

  Returns:
    the callback interval, in ms

### getComponentByElementId

    public Component getComponentByElementId(java.lang.String elementId)

  Retrieves the `Component` with the specified element id.

  Parameters:
    `elementId` - the element id, e.g., "c_42323"
  Returns:
    the component (e.g., the component whose id is "42323")

### getIdTable

    public IdTable getIdTable()

  Retrieves the `IdTable` used by this `ContainerInstance` to assign weakly-referenced unique identifiers to arbitrary objects.

  Returns:
    the `IdTable`

### getInitialRequestParameterMap

    public java.util.Map getInitialRequestParameterMap()

  Returns an immutable `Map` containing the HTTP form parameters sent on the initial request to the application.

  Returns:
    the initial request parameter map

### getRenderState

    public RenderState getRenderState(Component component)

  Retrieves the `RenderState` of the specified `Component`.

  Parameters:
    `component` - the component
  Returns:
    the rendering state

### getUpdateManager

    public UpdateManager getUpdateManager()

  Convenience method to retrieve the application's `UpdateManager`, which is used to synchronize client and server states. This method is equivalent to invoking `getApplicationInstance().getUpdateManager()`.

  Returns:
    the `UpdateManager`

### init

    public void init(Connection conn)

  Initializes the `ContainerInstance`, creating an instance of the target `ApplicationInstance` and initializing the state of the application.

  Parameters:
    `conn` - the relevant `Connection`

### removeRenderState

    public void removeRenderState(Component component)

  Removes the `RenderState` of the specified `Component`.

  Parameters:
    `component` - the component

### setRenderState

    public void setRenderState(Component component,
                               RenderState renderState)

  Sets the `RenderState` of the specified `Component`.

  Parameters:
    `component` - the component
    `renderState` - the render state

### setTaskQueueCallbackInterval

    public void setTaskQueueCallbackInterval(TaskQueueHandle taskQueue,
                                             int ms)

  Sets the interval between asynchronous callbacks from the client to check for queued tasks for a given `TaskQueue`. If multiple `TaskQueue`s are active, the smallest specified interval should be used. The default interval is 500ms. Application access to this method should be accessed via the `ContainerContext`.

  Parameters:
    `taskQueue` - the `TaskQueue`
    `ms` - the number of milliseconds between asynchronous client callbacks
  See Also:
    `ContainerContext.setTaskQueueCallbackInterval(nextapp.echo2.app.TaskQueueHandle, int)`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD