org.apache.openejb.server.httpd
Class ServletRequestAdapter

java.lang.Object
  extended by org.apache.openejb.server.httpd.ServletRequestAdapter
All Implemented Interfaces:
Serializable, HttpRequest

public class ServletRequestAdapter
extends Object
implements HttpRequest

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.apache.openejb.server.httpd.HttpRequest
HttpRequest.Method
 
Field Summary
 
Fields inherited from interface org.apache.openejb.server.httpd.HttpRequest
HEADER_ACCEPT, HEADER_ACCEPT_ENCODING, HEADER_ACCEPT_LANGUAGE, HEADER_CACHE_CONTROL, HEADER_CONNECTION, HEADER_CONTENT_LENGTH, HEADER_CONTENT_TYPE, HEADER_COOKIE, HEADER_HOST, HEADER_SET_COOKIE, HEADER_USER_AGENT, SERVLET_CONTEXT, SERVLET_REQUEST, SERVLET_RESPONSE
 
Constructor Summary
ServletRequestAdapter(javax.servlet.http.HttpServletRequest request)
           
ServletRequestAdapter(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, javax.servlet.ServletContext servletContext)
           
 
Method Summary
 Object getAttribute(String s)
           
 int getContentLength()
           
 String getContentType()
           
 String getContextPath()
           
 String getHeader(String name)
          Gets a header based the header name passed in.
 InputStream getInputStream()
           
 HttpRequest.Method getMethod()
          Gets an integer value of the request method.
 String getParameter(String name)
          Gets a form or URL query parameter based on the name passed in.
 Map getParameters()
          Gets all the form and URL query parameters
 String getRemoteAddr()
           
 HttpSession getSession()
          Returns the current session associated with this request, or if the request does not have a session, creates one.
 HttpSession getSession(boolean create)
          Returns the current HttpSession associated with this request or, if there is no current session and create is true, returns a new session.
 URI getURI()
          Gets the URI for the current URL page.
 void setAttribute(String s, Object o)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ServletRequestAdapter

public ServletRequestAdapter(javax.servlet.http.HttpServletRequest request)

ServletRequestAdapter

public ServletRequestAdapter(javax.servlet.http.HttpServletRequest request,
                             javax.servlet.http.HttpServletResponse response,
                             javax.servlet.ServletContext servletContext)
Method Detail

getSession

public HttpSession getSession(boolean create)
Description copied from interface: HttpRequest
Returns the current HttpSession associated with this request or, if there is no current session and create is true, returns a new session.

If create is false and the request has no valid HttpSession, this method returns null.

Specified by:
getSession in interface HttpRequest
Parameters:
create - true to create a new session for this request if necessary; false to return null if there's no current session
Returns:
the HttpSession associated with this request or null if create is false and the request has no valid session
See Also:
HttpRequest.getSession()

getSession

public HttpSession getSession()
Description copied from interface: HttpRequest
Returns the current session associated with this request, or if the request does not have a session, creates one.

Specified by:
getSession in interface HttpRequest
Returns:
the HttpSession associated with this request
See Also:
HttpRequest.getSession(boolean)

getHeader

public String getHeader(String name)
Description copied from interface: HttpRequest
Gets a header based the header name passed in.

Specified by:
getHeader in interface HttpRequest
Parameters:
name - The name of the header to get
Returns:
The value of the header

getURI

public URI getURI()
Description copied from interface: HttpRequest
Gets the URI for the current URL page.

Specified by:
getURI in interface HttpRequest
Returns:
The URI

getContentLength

public int getContentLength()
Specified by:
getContentLength in interface HttpRequest

getContentType

public String getContentType()
Specified by:
getContentType in interface HttpRequest

getContextPath

public String getContextPath()

getInputStream

public InputStream getInputStream()
                           throws IOException
Specified by:
getInputStream in interface HttpRequest
Throws:
IOException

getMethod

public HttpRequest.Method getMethod()
Description copied from interface: HttpRequest
Gets an integer value of the request method.

Specified by:
getMethod in interface HttpRequest
Returns:
The integer value of the method

getParameter

public String getParameter(String name)
Description copied from interface: HttpRequest
Gets a form or URL query parameter based on the name passed in.

Specified by:
getParameter in interface HttpRequest

getParameters

public Map getParameters()
Description copied from interface: HttpRequest
Gets all the form and URL query parameters

Specified by:
getParameters in interface HttpRequest
Returns:
All the form and URL query parameters

getAttribute

public Object getAttribute(String s)
Specified by:
getAttribute in interface HttpRequest

setAttribute

public void setAttribute(String s,
                         Object o)
Specified by:
setAttribute in interface HttpRequest

getRemoteAddr

public String getRemoteAddr()
Specified by:
getRemoteAddr in interface HttpRequest


Copyright © 1999-2011 The Apache OpenEJB development community. All Rights Reserved.