Package org.springframework.http.server
Class ServletServerHttpRequest
java.lang.Object
org.springframework.http.server.ServletServerHttpRequest
- All Implemented Interfaces:
- HttpInputMessage,- HttpMessage,- HttpRequest,- ServerHttpRequest
- Direct Known Subclasses:
- RequestPartServletServerHttpRequest
ServerHttpRequest implementation that is based on a HttpServletRequest.- Since:
- 3.0
- Author:
- Arjen Poutsma, Rossen Stoyanchev, Juergen Hoeller
- 
Field SummaryFields
- 
Constructor SummaryConstructorsConstructorDescriptionServletServerHttpRequest(HttpServletRequest servletRequest) Construct a new instance of the ServletServerHttpRequest based on the givenHttpServletRequest.
- 
Method SummaryModifier and TypeMethodDescriptiongetAsyncRequestControl(ServerHttpResponse response) Return a control that allows putting the request in asynchronous mode so the response remains open until closed explicitly from the current or another thread.getBody()Return the body of the message as an input stream.Return the headers of this message.Return the address on which the request was received.Return the HTTP method of the request.Return aPrincipalinstance containing the name of the authenticated user.Return the address of the remote client.Returns theHttpServletRequestthis object is based on.getURI()Return the URI of the request (including a query string if any, but only if it is well-formed for a URI representation).Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.http.HttpRequestgetMethodValue
- 
Field Details- 
FORM_CHARSET
 
- 
- 
Constructor Details- 
ServletServerHttpRequestConstruct a new instance of the ServletServerHttpRequest based on the givenHttpServletRequest.- Parameters:
- servletRequest- the servlet request
 
 
- 
- 
Method Details- 
getServletRequestReturns theHttpServletRequestthis object is based on.
- 
getMethodDescription copied from interface:HttpRequestReturn the HTTP method of the request.- Specified by:
- getMethodin interface- HttpRequest
- Returns:
- the HTTP method as an HttpMethod value
- See Also:
 
- 
getURIDescription copied from interface:HttpRequestReturn the URI of the request (including a query string if any, but only if it is well-formed for a URI representation).- Specified by:
- getURIin interface- HttpRequest
- Returns:
- the URI of the request (never null)
 
- 
getHeadersDescription copied from interface:HttpMessageReturn the headers of this message.- Specified by:
- getHeadersin interface- HttpMessage
- Returns:
- a corresponding HttpHeaders object (never null)
 
- 
getPrincipalDescription copied from interface:ServerHttpRequestReturn aPrincipalinstance containing the name of the authenticated user.If the user has not been authenticated, the method returns null.- Specified by:
- getPrincipalin interface- ServerHttpRequest
 
- 
getLocalAddressDescription copied from interface:ServerHttpRequestReturn the address on which the request was received.- Specified by:
- getLocalAddressin interface- ServerHttpRequest
 
- 
getRemoteAddressDescription copied from interface:ServerHttpRequestReturn the address of the remote client.- Specified by:
- getRemoteAddressin interface- ServerHttpRequest
 
- 
getBodyDescription copied from interface:HttpInputMessageReturn the body of the message as an input stream.- Specified by:
- getBodyin interface- HttpInputMessage
- Returns:
- the input stream body (never null)
- Throws:
- IOException- in case of I/O errors
 
- 
getAsyncRequestControlDescription copied from interface:ServerHttpRequestReturn a control that allows putting the request in asynchronous mode so the response remains open until closed explicitly from the current or another thread.- Specified by:
- getAsyncRequestControlin interface- ServerHttpRequest
 
 
-