net.officefloor.plugin.socket.server.http.protocol
Class HttpServer

java.lang.Object
  extended by net.officefloor.plugin.socket.server.http.protocol.HttpServer
All Implemented Interfaces:
Server<HttpConnectionHandler>

public class HttpServer
extends Object
implements Server<HttpConnectionHandler>

HTTP Server.

Author:
Daniel Sagenschneider

Constructor Summary
HttpServer(int requestHandlingFlowIndex)
          Initiate.
 
Method Summary
 void processRequest(HttpConnectionHandler 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HttpServer

public HttpServer(int requestHandlingFlowIndex)
Initiate.

Parameters:
requestHandlingFlowIndex - Flow index to handle processing HttpRequest.
Method Detail

setManagedObjectExecuteContext

public void setManagedObjectExecuteContext(ManagedObjectExecuteContext<Indexed> executeContext)
Description copied from interface: Server
Provides the Server the ManagedObjectExecuteContext to enable it to invoke ProcessState instances to process input.

Specified by:
setManagedObjectExecuteContext in interface Server<HttpConnectionHandler>
Parameters:
executeContext - ManagedObjectExecuteContext.

processRequest

public void processRequest(HttpConnectionHandler connectionHandler,
                           Object attachment)
                    throws IOException
Description copied from interface: Server

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.

Specified by:
processRequest in interface Server<HttpConnectionHandler>
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.