org.cruxframework.crux.core.server.rest.spi
Class HttpRequest
java.lang.Object
org.cruxframework.crux.core.server.rest.spi.HttpRequest
public class HttpRequest
- extends Object
Abstraction for an inbound http request on the server, or a response from a
server to a client
We have this abstraction so that we can reuse marshalling objects in a client
framework and serverside framework
- Version:
- $Revision: 1 $
- Author:
- Bill Burke
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
httpHeaders
protected final HttpHeaders httpHeaders
request
protected final javax.servlet.http.HttpServletRequest request
uri
protected final UriInfo uri
httpMethod
protected final String httpMethod
formParameters
protected MultivaluedMap<String,String> formParameters
decodedFormParameters
protected MultivaluedMap<String,String> decodedFormParameters
HttpRequest
public HttpRequest(javax.servlet.http.HttpServletRequest request,
HttpHeaders httpHeaders,
UriInfo uri,
String httpMethod)
getPutFormParameters
public MultivaluedMap<String,String> getPutFormParameters()
getPutDecodedFormParameters
public MultivaluedMap<String,String> getPutDecodedFormParameters()
getAttribute
public Object getAttribute(String attribute)
setAttribute
public void setAttribute(String name,
Object value)
removeAttribute
public void removeAttribute(String name)
getUserPrincipal
public Principal getUserPrincipal()
- See Also:
javax.servlet.http.HttpServletRequest.getUserPrincipal()
getAttributeNames
public Enumeration<String> getAttributeNames()
getFormParameters
public MultivaluedMap<String,String> getFormParameters()
getDecodedFormParameters
public MultivaluedMap<String,String> getDecodedFormParameters()
getHttpHeaders
public HttpHeaders getHttpHeaders()
getInputStream
public InputStream getInputStream()
getUri
public UriInfo getUri()
getHttpMethod
public String getHttpMethod()
parseForm
protected MultivaluedMap<String,String> parseForm(InputStream entityStream)
throws IOException
- Throws:
IOException
getSession
public javax.servlet.http.HttpSession getSession()
- See Also:
javax.servlet.http.HttpServletRequest.getSession()
getSession
public javax.servlet.http.HttpSession getSession(boolean create)
- See Also:
javax.servlet.http.HttpServletRequest.getSession(boolean)
getContextPath
public String getContextPath()
- See Also:
javax.servlet.http.HttpServletRequest.getContextPath()
getLocale
public Locale getLocale()
- Returns:
- the current locale.
- See Also:
request.getLocale();
getRemoteHost
public String getRemoteHost()
- Returns:
- a
String container the remote host. - See Also:
request.getRemoteHost();
getRemoteAddr
public String getRemoteAddr()
- Returns:
- a
String containing the fully
qualified name of the client - See Also:
request.getRemoteAddr();
getRemotePort
public int getRemotePort()
- Returns:
- a
int container the remote port. - See Also:
request.getRemotePort();
getRemoteUser
public String getRemoteUser()
- Returns:
- a
String container the remote user. - See Also:
request.getRemoteUser();
Copyright © 2014. All rights reserved.