|
NextApp Echo3 v3.0.b4 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object nextapp.echo.webcontainer.UserInstance
public class UserInstance
Object representing a single user-instance of an application hosted in the web application container. This object is stored in the HttpSession.
Field Summary | |
---|---|
static java.lang.String |
PROPERTY_CLIENT_CONFIGURATION
Client configuration data property name. |
Constructor Summary | |
---|---|
UserInstance(Connection conn)
Creates a new UserInstance . |
Method Summary | |
---|---|
void |
clearRenderStates()
Clears all RenderState information. |
nextapp.echo.app.ApplicationInstance |
getApplicationInstance()
Returns the corresponding ApplicationInstance
for this user instance. |
int |
getCallbackInterval()
Determines the application-specified asynchronous monitoring service callback interval. |
java.lang.String |
getCharacterEncoding()
Returns the default character encoding in which responses should be rendered. |
ClientConfiguration |
getClientConfiguration()
The ServerDelayMessage displayed during client/server-interactions. |
ClientProperties |
getClientProperties()
Retrieves the ClientProperties object providing
information about the client of this instance. |
java.lang.String |
getClientRenderId(nextapp.echo.app.Component component)
Returns the client-side render id that should be used when rendering the specified Component . |
nextapp.echo.app.Component |
getComponentByClientRenderId(java.lang.String clientRenderId)
Retrieves the Component with the specified client-side render id. |
int |
getCurrentTransactionId()
Returns the current transaction id. |
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. |
int |
getNextTransactionId()
Increments the current transaction id and returns it. |
RenderState |
getRenderState(nextapp.echo.app.Component component)
Retrieves the RenderState of the specified
Component . |
java.lang.String |
getRootHtmlElementId()
Returns the id of the HTML element that will serve as the Root component. |
java.lang.String |
getServiceUri(Service service)
Determines the URI to invoke the specified Service . |
java.lang.String |
getServiceUri(Service service,
java.lang.String[] parameterNames,
java.lang.String[] parameterValues)
Determines the URI to invoke the specified Service with
additional request parameters. |
java.lang.String |
getServletUri()
Returns the URI of the servlet managing this UserInstance . |
javax.servlet.http.HttpSession |
getSession()
Returns the HttpSession containing this
UserInstance . |
nextapp.echo.app.update.UpdateManager |
getUpdateManager()
Convenience method to retrieve the application's UpdateManager , which is used to synchronize
client and server states. |
UserInstanceUpdateManager |
getUserInstanceUpdateManager()
Returns the UserInstanceUpdateManager providing information
about updated UserInstance properties. |
void |
init(Connection conn)
Initializes the UserInstance , creating an instance
of the target ApplicationInstance . |
boolean |
isInitialized()
Determines if the UserInstance has been initialized,
i.e., whether its init() method has been invoked. |
static void |
newInstance(Connection conn)
Creates a new Web Application Container instance using the provided client Connection . |
void |
purgeRenderStates()
Removes all RenderState s whose components are not
registered. |
void |
removeRenderState(nextapp.echo.app.Component component)
Removes the RenderState of the specified
Component . |
void |
sessionDidActivate(javax.servlet.http.HttpSessionEvent e)
|
void |
sessionWillPassivate(javax.servlet.http.HttpSessionEvent e)
|
void |
setClientConfiguration(ClientConfiguration clientConfiguration)
Sets the ClientConfiguration information containing
application-specific client behavior settings. |
void |
setRenderState(nextapp.echo.app.Component component,
RenderState renderState)
Sets the RenderState of the specified
Component . |
void |
setTaskQueueCallbackInterval(nextapp.echo.app.TaskQueueHandle taskQueue,
int ms)
Sets the interval between asynchronous callbacks from the client to check for queued tasks for a given TaskQueue . |
void |
valueBound(javax.servlet.http.HttpSessionBindingEvent e)
Listener implementation of HttpSessionBindingListener . |
void |
valueUnbound(javax.servlet.http.HttpSessionBindingEvent e)
Listener implementation of HttpSessionBindingListener . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String PROPERTY_CLIENT_CONFIGURATION
Constructor Detail |
---|
public UserInstance(Connection conn)
UserInstance
.
conn
- the client/server Connection
for which the
instance is being instantiatedMethod Detail |
---|
public static void newInstance(Connection conn)
Connection
. The instance will automatically
be stored in the relevant HttpSession
conn
- the client/server Connection
for which the
instance is being instantiatedpublic void clearRenderStates()
RenderState
information.
public nextapp.echo.app.ApplicationInstance getApplicationInstance()
ApplicationInstance
for this user instance. Initializes the ApplicationInstance
if it has not already been done.
ApplicationInstance
public int getCallbackInterval()
public java.lang.String getCharacterEncoding()
public ClientConfiguration getClientConfiguration()
ServerDelayMessage
displayed during client/server-interactions.
Retrieves the ClientConfiguration
information containing application-specific client behavior settings.
ClientProperties
public ClientProperties getClientProperties()
ClientProperties
object providing
information about the client of this instance.
ClientProperties
public java.lang.String getClientRenderId(nextapp.echo.app.Component component)
Component
.
component
- the component
public nextapp.echo.app.Component getComponentByClientRenderId(java.lang.String clientRenderId)
Component
with the specified client-side render id.
clientRenderId
- client-side element render id, e.g., "C.42323"
public int getCurrentTransactionId()
public IdTable getIdTable()
IdTable
used by this
ContainerInstance
to assign weakly-referenced unique
identifiers to arbitrary objects.
IdTable
public java.util.Map getInitialRequestParameterMap()
Map
containing the HTTP form
parameters sent on the initial request to the application.
public int getNextTransactionId()
public RenderState getRenderState(nextapp.echo.app.Component component)
RenderState
of the specified
Component
.
component
- the component
public java.lang.String getRootHtmlElementId()
public java.lang.String getServiceUri(Service service)
Service
.
service
- the Service
public java.lang.String getServiceUri(Service service, java.lang.String[] parameterNames, java.lang.String[] parameterValues)
Service
with
additional request parameters. The additional parameters are provided by
way of the parameterNames
and parameterValues
arrays. The value of a parameter at a specific index in the
parameterNames
array is provided in the
parameterValues
array at the same index. The arrays must
thus be of equal length. Null values are allowed in the
parameterValues
array, and in such cases only the parameter
name will be rendered in the returned URI.
service
- the Service
parameterNames
- the names of the additional URI parametersparameterValues
- the values of the additional URI parameters
public java.lang.String getServletUri()
UserInstance
.
public javax.servlet.http.HttpSession getSession()
HttpSession
containing this
UserInstance
.
HttpSession
public nextapp.echo.app.update.UpdateManager getUpdateManager()
UpdateManager
, which is used to synchronize
client and server states.
This method is equivalent to invoking
getApplicationInstance().getUpdateManager()
.
UpdateManager
public UserInstanceUpdateManager getUserInstanceUpdateManager()
UserInstanceUpdateManager
providing information
about updated UserInstance
properties.
UserInstanceUpdateManager
public void init(Connection conn)
UserInstance
, creating an instance
of the target ApplicationInstance
.
The ApplicationInstance
will not be initialized until
getApplicationInstance()
is invoked for the first time.
conn
- the relevant Connection
public boolean isInitialized()
UserInstance
has been initialized,
i.e., whether its init()
method has been invoked.
UserInstance
is initializedpublic void purgeRenderStates()
RenderState
s whose components are not
registered.
public void removeRenderState(nextapp.echo.app.Component component)
RenderState
of the specified
Component
.
component
- the componentpublic void sessionDidActivate(javax.servlet.http.HttpSessionEvent e)
sessionDidActivate
in interface javax.servlet.http.HttpSessionActivationListener
Recreates reference to session.
Notifies ApplicationInstance
of activation.
public void sessionWillPassivate(javax.servlet.http.HttpSessionEvent e)
sessionWillPassivate
in interface javax.servlet.http.HttpSessionActivationListener
Notifies ApplicationInstance
of passivation.
Discards reference to session.
public void setClientConfiguration(ClientConfiguration clientConfiguration)
ClientConfiguration
information containing
application-specific client behavior settings.
clientConfiguration
- the new ClientConfiguration
public void setRenderState(nextapp.echo.app.Component component, RenderState renderState)
RenderState
of the specified
Component
.
component
- the componentrenderState
- the render statepublic void setTaskQueueCallbackInterval(nextapp.echo.app.TaskQueueHandle taskQueue, int ms)
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
.
taskQueue
- the TaskQueue
ms
- the number of milliseconds between asynchronous client
callbacksContainerContext.setTaskQueueCallbackInterval(nextapp.echo.app.TaskQueueHandle, int)
public void valueBound(javax.servlet.http.HttpSessionBindingEvent e)
HttpSessionBindingListener
.
Stores reference to session when invoked.
valueBound
in interface javax.servlet.http.HttpSessionBindingListener
HttpSessionBindingListener.valueBound(HttpSessionBindingEvent)
public void valueUnbound(javax.servlet.http.HttpSessionBindingEvent e)
HttpSessionBindingListener
.
Disposes ApplicationInstance
.
Removes reference to session when invoked.
valueUnbound
in interface javax.servlet.http.HttpSessionBindingListener
HttpSessionBindingListener.valueUnbound(HttpSessionBindingEvent)
|
NextApp Echo3 v3.0.b4 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |