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

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

public class HttpRequestImpl
extends Object
implements HttpRequest

HttpRequest implementation.

Author:
Daniel Sagenschneider

Constructor Summary
HttpRequestImpl(String method, String requestURI, String httpVersion, List<HttpHeader> headers, InputBufferStream body)
          Initiate.
 
Method Summary
 InputBufferStream getBody()
          Obtains the InputBufferStream to the body of the HTTP request.
 List<HttpHeader> getHeaders()
          Obtains the HttpHeader instances in the order they appear on the request.
 String getMethod()
          Obtains the HTTP method.
 String getRequestURI()
          Obtains the Request URI as provided on the request.
 String getVersion()
          Obtains the HTTP version of the request.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HttpRequestImpl

public HttpRequestImpl(String method,
                       String requestURI,
                       String httpVersion,
                       List<HttpHeader> headers,
                       InputBufferStream body)
Initiate.

Parameters:
method - Method.
requestURI - Request URI.
httpVersion - HTTP version.
headers - HttpHeader instances.
body - InputBufferStream to the body.
Method Detail

getMethod

public String getMethod()
Description copied from interface: HttpRequest
Obtains the HTTP method. For example GET, POST, etc.

Specified by:
getMethod in interface HttpRequest
Returns:
HTTP method.

getRequestURI

public String getRequestURI()
Description copied from interface: HttpRequest
Obtains the Request URI as provided on the request.

Specified by:
getRequestURI in interface HttpRequest
Returns:
Request URI as provided on the request.

getVersion

public String getVersion()
Description copied from interface: HttpRequest
Obtains the HTTP version of the request. For example HTTP/1.0, HTTP/1.1, etc.

Specified by:
getVersion in interface HttpRequest
Returns:
HTTP version of the request.

getHeaders

public List<HttpHeader> getHeaders()
Description copied from interface: HttpRequest
Obtains the HttpHeader instances in the order they appear on the request.

Specified by:
getHeaders in interface HttpRequest
Returns:
HttpHeader instances in the order they appear on the request.

getBody

public InputBufferStream getBody()
Description copied from interface: HttpRequest
Obtains the InputBufferStream to the body of the HTTP request.

Specified by:
getBody in interface HttpRequest
Returns:
InputBufferStream to the body of the HTTP request.


Copyright © 2005-2011. All Rights Reserved.