net.officefloor.plugin.servlet.socket.server.http
Class ServletServerHttpConnection

java.lang.Object
  extended by net.officefloor.plugin.servlet.socket.server.http.ServletServerHttpConnection
All Implemented Interfaces:
ServerHttpConnection

public class ServletServerHttpConnection
extends Object
implements ServerHttpConnection

Implementation of ServerHttpConnection backed by Servlet.

Author:
Daniel Sagenschneider

Constructor Summary
ServletServerHttpConnection(javax.servlet.http.HttpServletRequest servletRequest, javax.servlet.http.HttpServletResponse servletResponse)
          Initiate.
 
Method Summary
 HttpRequest getHttpRequest()
           
 HttpResponse getHttpResponse()
           
 InetSocketAddress getLocalAddress()
           
 InetSocketAddress getRemoteAddress()
           
static String getRequestPath(javax.servlet.http.HttpServletRequest request)
          Obtains the request path from the HttpServletRequest which includes the query information.
static String getRequestUri(javax.servlet.http.HttpServletRequest request)
          Obtains the request URI from the HttpServletRequest.
 boolean isSecure()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ServletServerHttpConnection

public ServletServerHttpConnection(javax.servlet.http.HttpServletRequest servletRequest,
                                   javax.servlet.http.HttpServletResponse servletResponse)
Initiate.

Parameters:
servletRequest - HttpServletRequest.
servletResponse - HttpServletResponse.
Method Detail

getRequestUri

public static String getRequestUri(javax.servlet.http.HttpServletRequest request)
Obtains the request URI from the HttpServletRequest.

Parameters:
request - HttpServletRequest.
Returns:
Request URI.

getRequestPath

public static String getRequestPath(javax.servlet.http.HttpServletRequest request)
Obtains the request path from the HttpServletRequest which includes the query information.

Parameters:
request - HttpServletRequest.
Returns:
Request URI.

isSecure

public boolean isSecure()
Specified by:
isSecure in interface ServerHttpConnection

getLocalAddress

public InetSocketAddress getLocalAddress()
Specified by:
getLocalAddress in interface ServerHttpConnection

getRemoteAddress

public InetSocketAddress getRemoteAddress()
Specified by:
getRemoteAddress in interface ServerHttpConnection

getHttpRequest

public HttpRequest getHttpRequest()
Specified by:
getHttpRequest in interface ServerHttpConnection

getHttpResponse

public HttpResponse getHttpResponse()
Specified by:
getHttpResponse in interface ServerHttpConnection


Copyright © 2005-2011. All Rights Reserved.