NextApp Echo
App Container 1.0.5

nextapp.echoservlet
Class Initializer

java.lang.Object
  extended bynextapp.echoservlet.Initializer
All Implemented Interfaces:
java.io.Serializable, Service

final class Initializer
extends java.lang.Object
implements java.io.Serializable, Service

The service is responsible for initializing applications. This is the first service that will be invoked when an application starts up. It provides a client detection page that will use JavaScript to gather information about public properties of the client browser, storing them in a form. The form is submitted immediately thereafter, invoking this service a second time. The form data will be parsed by a new ClientProperties object that is created from this service. An InstancePeer and related objects are then created for the application, stored in the user's session, and initialized. The service() method of the application's default window is then invoked, allowing the application to take control.


Field Summary
private static Id ID
          The Id of this service
static java.lang.String PARAMETER_DETECT_COMPLETE
          The HTTP form parameter name used by the client detection script to indicate client detection information has been retrieved.
private static Service SERVICE_CLIENT_DETECT
          The client detection service.
private static Service SERVICE_STARTUP_CONTAINER
          The client detection service.
 
Constructor Summary
(package private) Initializer()
          Creates an Initializer service.
 
Method Summary
static VariableData createInitialVariableData(Connection conn)
          Creates one-time-use variable data used to start the application.
 Id getId()
          Returns a unique identifier for this service.
 void service(Connection conn)
          Services an HTTP request.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ID

private static final Id ID
The Id of this service


PARAMETER_DETECT_COMPLETE

public static final java.lang.String PARAMETER_DETECT_COMPLETE
The HTTP form parameter name used by the client detection script to indicate client detection information has been retrieved.

See Also:
Constant Field Values

SERVICE_CLIENT_DETECT

private static final Service SERVICE_CLIENT_DETECT
The client detection service. It is not necessary that this service be registered with the EchoServer.


SERVICE_STARTUP_CONTAINER

private static final Service SERVICE_STARTUP_CONTAINER
The client detection service. It is not necessary that this service be registered with the EchoServer.

Constructor Detail

Initializer

Initializer()
Creates an Initializer service. Only initializer service is used by the entire application.

Method Detail

createInitialVariableData

public static VariableData createInitialVariableData(Connection conn)
Creates one-time-use variable data used to start the application.

Parameters:
conn - The connection for which the variable data will be used.
Returns:
The generated VariableData object.

getId

public Id getId()
Description copied from interface: Service
Returns a unique identifier for this service.

Specified by:
getId in interface Service
Returns:
A unique identifier for this service.
See Also:
Service.getId()

service

public void service(Connection conn)
             throws java.io.IOException
Description copied from interface: Service
Services an HTTP request. Information about the HTTP request as well as methods for issuing a response are available from the provided Connection object.

Specified by:
service in interface Service
Parameters:
conn - A Connection object which wraps HttpServletRequest and HttpServletResponse objects and provides access to the facilities of the Echo application container.
Throws:
java.io.IOException - in the event of errors related to processing the HTTP request or producing a response.
See Also:
Service.service(Connection)

NextApp Echo
App Container 1.0.5