NextApp Echo3
v3.0.b4

nextapp.echo.webcontainer
Interface ContainerContext


public interface ContainerContext

Contextual information about the application container provided to an application instance. The ContainerContext will be stored as a context property of an application's ApplicationInstance, under the key constant CONTEXT_PROPERTY_NAME. This interface should not be implemented outside of the core framework.


Field Summary
static java.lang.String CONTEXT_PROPERTY_NAME
          Property name by which a ContainerContext may be retrieved from an ApplicationInstance's context properties.
 
Method Summary
 void addCookie(javax.servlet.http.Cookie cookie)
          Adds a Cookie to the client on the outgoing connection, if one is available.
 ClientProperties getClientProperties()
          Returns the ClientProperties describing the user's client web browser environment.
 javax.servlet.http.Cookie[] getCookies()
          Return any Cookies sent on the current HTTP request.
 java.util.Map getInitialRequestParameterMap()
          Returns an immutable Map containing the HTTP request parameters sent on the initial request to the application.
 java.lang.String getServiceUri(Service service)
          Returns the URI of the specified Service.
 java.lang.String getServletUri()
          Returns the URI of the Echo servlet.
 javax.servlet.http.HttpSession getSession()
          Returns the HttpSession in which the application is being stored.
 java.security.Principal getUserPrincipal()
          Returns the authenticated user Principal.
 boolean isUserInRole(java.lang.String role)
          Determines if the authenticated user is in the specified logical "role", by querying the inbound servlet request.
 void setClientConfiguration(ClientConfiguration clientConfiguration)
          Sets the ClientConfiguration describing application-specific client configuration settings.
 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.
 

Field Detail

CONTEXT_PROPERTY_NAME

static final java.lang.String CONTEXT_PROPERTY_NAME
Property name by which a ContainerContext may be retrieved from an ApplicationInstance's context properties.

See Also:
ApplicationInstance.getContextProperty(java.lang.String)
Method Detail

addCookie

void addCookie(javax.servlet.http.Cookie cookie)
               throws java.lang.IllegalStateException
Adds a Cookie to the client on the outgoing connection, if one is available.

Parameters:
cookie - the cookie to add
Throws:
java.lang.IllegalStateException - if no connection is available to store the cookie

getClientProperties

ClientProperties getClientProperties()
Returns the ClientProperties describing the user's client web browser environment.

Returns:
the ClientProperties

getCookies

javax.servlet.http.Cookie[] getCookies()
Return any Cookies sent on the current HTTP request.

Returns:
the Cookies

getInitialRequestParameterMap

java.util.Map getInitialRequestParameterMap()
Returns an immutable Map containing the HTTP request parameters sent on the initial request to the application.

Returns:
the initial request parameter map

getServiceUri

java.lang.String getServiceUri(Service service)
Returns the URI of the specified Service.

Parameters:
service - the Service
Returns:
the URI

getServletUri

java.lang.String getServletUri()
Returns the URI of the Echo servlet.

Returns:
the servlet URI

getSession

javax.servlet.http.HttpSession getSession()
Returns the HttpSession in which the application is being stored.

Returns:
the HttpSession

getUserPrincipal

java.security.Principal getUserPrincipal()
Returns the authenticated user Principal.

Returns:
the authenticated user Principal

isUserInRole

boolean isUserInRole(java.lang.String role)
Determines if the authenticated user is in the specified logical "role", by querying the inbound servlet request.


setClientConfiguration

void setClientConfiguration(ClientConfiguration clientConfiguration)
Sets the ClientConfiguration describing application-specific client configuration settings.

Parameters:
clientConfiguration - the new ClientConfiguration

setTaskQueueCallbackInterval

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. If multiple TaskQueues are active, the smallest specified interval should be used. The default interval is 500ms.

Parameters:
taskQueue - the TaskQueue
ms - the number of milliseconds between asynchronous client callbacks

NextApp Echo3
v3.0.b4