org.springframework.http.server
Class ServletServerHttpRequest

java.lang.Object
  extended by org.springframework.http.server.ServletServerHttpRequest
All Implemented Interfaces:
HttpInputMessage, HttpMessage, ServerHttpRequest

public class ServletServerHttpRequest
extends java.lang.Object
implements ServerHttpRequest

ServerHttpRequest implementation that is based on a HttpServletRequest.

Since:
3.0
Author:
Arjen Poutsma

Field Summary
private  HttpHeaders headers
           
private  javax.servlet.http.HttpServletRequest servletRequest
           
 
Constructor Summary
ServletServerHttpRequest(javax.servlet.http.HttpServletRequest servletRequest)
          Construct a new instance of the ServletServerHttpRequest based on the given HttpServletRequest
 
Method Summary
 java.io.InputStream getBody()
          Return the body of the message as an input stream.
 HttpHeaders getHeaders()
          Return the headers of this message.
 HttpMethod getMethod()
          Return the HTTP method of the request.
 java.net.URI getURI()
          Return the URI of the request.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

servletRequest

private final javax.servlet.http.HttpServletRequest servletRequest

headers

private HttpHeaders headers
Constructor Detail

ServletServerHttpRequest

public ServletServerHttpRequest(javax.servlet.http.HttpServletRequest servletRequest)
Construct a new instance of the ServletServerHttpRequest based on the given HttpServletRequest

Parameters:
servletRequest - the HttpServletRequest
Method Detail

getMethod

public HttpMethod getMethod()
Description copied from interface: ServerHttpRequest
Return the HTTP method of the request.

Specified by:
getMethod in interface ServerHttpRequest
Returns:
the HTTP method as an HttpMethod enum value

getURI

public java.net.URI getURI()
Description copied from interface: ServerHttpRequest
Return the URI of the request.

Specified by:
getURI in interface ServerHttpRequest
Returns:
the URI of the request

getHeaders

public HttpHeaders getHeaders()
Description copied from interface: HttpMessage
Return the headers of this message.

Specified by:
getHeaders in interface HttpMessage
Returns:
a corresponding HttpHeaders object

getBody

public java.io.InputStream getBody()
                            throws java.io.IOException
Description copied from interface: HttpInputMessage
Return the body of the message as an input stream.

Specified by:
getBody in interface HttpInputMessage
Returns:
the input stream body
Throws:
java.io.IOException - in case of I/O Errors