net.officefloor.plugin.socket.server.http.conversation.impl
Class HttpConversationImpl

java.lang.Object
  extended by net.officefloor.plugin.socket.server.http.conversation.impl.HttpConversationImpl
All Implemented Interfaces:
HttpConversation

public class HttpConversationImpl
extends Object
implements HttpConversation

Manages the HTTP conversation on a Connection.

Author:
Daniel Sagenschneider

Constructor Summary
HttpConversationImpl(Connection connection, BufferSquirtFactory bufferSquirtFactory, boolean isSendStackTraceOnFailure)
          Initiate.
 
Method Summary
 HttpManagedObject addRequest(String method, String requestURI, String httpVersion, List<HttpHeader> headers, InputBufferStream body)
          Adds a HttpRequest to the conversation.
 void parseFailure(HttpRequestParseException failure, boolean isCloseConnection)
          Handles a failure in parsing a HttpRequest.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HttpConversationImpl

public HttpConversationImpl(Connection connection,
                            BufferSquirtFactory bufferSquirtFactory,
                            boolean isSendStackTraceOnFailure)
Initiate.

Parameters:
connection - Connection.
bufferSquirtFactory - BufferSquirtFactory.
isSendStackTraceOnFailure - Flags whether to send the stack trace on failure.
Method Detail

addRequest

public HttpManagedObject addRequest(String method,
                                    String requestURI,
                                    String httpVersion,
                                    List<HttpHeader> headers,
                                    InputBufferStream body)
Description copied from interface: HttpConversation
Adds a HttpRequest to the conversation.

Specified by:
addRequest in interface HttpConversation
Parameters:
method - Method.
requestURI - Request URI.
httpVersion - HTTP Version.
headers - HttpHeader instances.
body - InputBufferStream to the contents of the HttpRequest.
Returns:
HttpManagedObject to process the HttpRequest.

parseFailure

public void parseFailure(HttpRequestParseException failure,
                         boolean isCloseConnection)
                  throws IOException
Description copied from interface: HttpConversation
Handles a failure in parsing a HttpRequest.

Specified by:
parseFailure in interface HttpConversation
Parameters:
failure - Failure in parsing a HttpRequest.
isCloseConnection - Flags to close the Connection once the HttpRequestParseException has been processed.
Throws:
IOException - If fails to write response regarding the HttpRequestParseException.


Copyright © 2005-2011. All Rights Reserved.