NextApp Echo3
v3.0.b4

nextapp.echo.webcontainer
Interface Service

All Known Implementing Classes:
AsyncMonitorService, ImageService, JavaScriptService, NewInstanceService, ResourceService, SessionExpiredService, StaticBinaryService, StaticTextService, SynchronizeService, WindowHtmlService

public interface Service

An interface for objects that process Connections, parsing an HTTP request and producing an HTTP response.

Every service is identified by a unique identifier. When the client browser makes a request of the server and provides the identifier of this service, its service() method will be invoked. Every request to an Echo application from a client browser will invoke a service.


Field Summary
static int DO_NOT_CACHE
          A value returned by getVersion() to indicate that a service should not be cached.
 
Method Summary
 java.lang.String getId()
          Returns the unique identifier of this service.
 int getVersion()
          Returns the version of the service to be retrieved.
 void service(Connection conn)
          Services an HTTP request.
 

Field Detail

DO_NOT_CACHE

static final int DO_NOT_CACHE
A value returned by getVersion() to indicate that a service should not be cached.

See Also:
Constant Field Values
Method Detail

getId

java.lang.String getId()
Returns the unique identifier of this service.

Returns:
the unique identifier of this service

getVersion

int getVersion()
Returns the version of the service to be retrieved. When a service is requested with an updated version number, a non-cached copy will be used. getVersion() should return distinct values whenever the service's content may have changed.

Returns:
the current version number of the service

service

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

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

NextApp Echo3
v3.0.b4