|
NextApp Echo2 v2.1.1 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnextapp.echo2.webrender.service.SynchronizeService
public abstract class SynchronizeService
A service which synchronizes the state of the client with that of the server. Requests made to this service are in the form of "ClientMessage" XML documents which describe the user's actions since the last synchronization, e.g., the input typed into text fields and the action taken (e.g., a button press) which caused the server interaction. The service parses this XML input from the client and performs updates to the server state of the application. Once the input has been processed by the server application, an output "ServerMessage" containing instructions to update the client state is generated as a response.
Nested Class Summary | |
---|---|
static interface |
SynchronizeService.ClientMessagePartProcessor
An interface describing a ClientMessage MessagePart Processor. |
Field Summary | |
---|---|
static java.lang.String |
SERVICE_ID
Service identifier. |
Fields inherited from interface nextapp.echo2.webrender.Service |
---|
DO_NOT_CACHE |
Constructor Summary | |
---|---|
SynchronizeService()
Creates a new SynchronizeService . |
Method Summary | |
---|---|
java.lang.String |
getId()
Returns the unique identifier of this service. |
int |
getVersion()
Returns the version of the service to be retrieved. |
protected void |
processClientMessage(Connection conn,
org.w3c.dom.Document clientMessageDocument)
Processes a "ClientMessage" XML document containing application UI state change information from the client. |
protected void |
registerClientMessagePartProcessor(SynchronizeService.ClientMessagePartProcessor processor)
Registers a ClientMessagePartProcessor to handle a
specific type of message part. |
protected abstract ServerMessage |
renderInit(Connection conn,
org.w3c.dom.Document clientMessageDocument)
Renders a ServerMessage in response to the initial
synchronization. |
protected abstract ServerMessage |
renderUpdate(Connection conn,
org.w3c.dom.Document clientMessageDocument)
Renders a ServerMessage in response to a synchronization
other than the initial synchronization. |
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 |
---|
public static final java.lang.String SERVICE_ID
Service
identifier.
Constructor Detail |
---|
public SynchronizeService()
SynchronizeService
.
Method Detail |
---|
public java.lang.String getId()
Service
getId
in interface Service
Service.getId()
public int getVersion()
Service
getVersion()
should return distinct values whenever the
service's content may have changed.
getVersion
in interface Service
Service.getVersion()
protected void processClientMessage(Connection conn, org.w3c.dom.Document clientMessageDocument)
ClientMessagePartProcessor
s registered to process them.
conn
- the relevant Connection
clientMessageDocument
- the ClientMessage XML document to processSynchronizeService.ClientMessagePartProcessor
protected void registerClientMessagePartProcessor(SynchronizeService.ClientMessagePartProcessor processor)
ClientMessagePartProcessor
to handle a
specific type of message part.
processor
- the ClientMessagePartProcessor
to
register
java.lang.IllegalStateException
- if a processor with the same name is
already registeredprotected abstract ServerMessage renderInit(Connection conn, org.w3c.dom.Document clientMessageDocument)
ServerMessage
in response to the initial
synchronization.
conn
- the relevant Connection
clientMessageDocument
- the ClientMessage XML document
ServerMessage
protected abstract ServerMessage renderUpdate(Connection conn, org.w3c.dom.Document clientMessageDocument)
ServerMessage
in response to a synchronization
other than the initial synchronization.
conn
- the relevant Connection
clientMessageDocument
- the ClientMessage XML document
ServerMessage
public void service(Connection conn) throws java.io.IOException
Service
service
in interface Service
conn
- A Connection
object which wraps
HttpServletRequest
and
HttpServletResponse
objects and provides
access to the facilities of the Echo application container.
java.io.IOException
- in the event of errors related to processing the
HTTP request or producing a response.Service.service(nextapp.echo2.webrender.Connection)
|
NextApp Echo2 v2.1.1 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |