net.officefloor.plugin.socket.server
Interface Server<CH extends ConnectionHandler>

All Known Implementing Classes:
HttpServer, SslCommunicationProtocol, TcpServer

public interface Server<CH extends ConnectionHandler>

Server to handle the input.

Required to be implemented by the handler provider.

Author:
Daniel Sagenschneider

Method Summary
 void processRequest(CH connectionHandler, Object attachment)
           Starts the processing the request identified by the ConnectionHandler with the Server.
 void setManagedObjectExecuteContext(ManagedObjectExecuteContext<Indexed> executeContext)
          Provides the Server the ManagedObjectExecuteContext to enable it to invoke ProcessState instances to process input.
 

Method Detail

setManagedObjectExecuteContext

void setManagedObjectExecuteContext(ManagedObjectExecuteContext<Indexed> executeContext)
Provides the Server the ManagedObjectExecuteContext to enable it to invoke ProcessState instances to process input.

Parameters:
executeContext - ManagedObjectExecuteContext.

processRequest

void processRequest(CH connectionHandler,
                    Object attachment)
                    throws IOException

Starts the processing the request identified by the ConnectionHandler with the Server.

To process a stream of input have the ConnectionHandler complete the Request with zero size and use the Connection passed to the ConnectionHandler.

Parameters:
connectionHandler - ConnectionHandler for the Connection.
attachment - Optional attachment provided by the ConnectionHandler specific to this request. May be null.
Throws:
IOException - If fails to start processing the request.


Copyright © 2005-2011. All Rights Reserved.