public class HttpRequest extends Object
| Modifier and Type | Field and Description |
|---|---|
protected MultivaluedMap<String,String> |
decodedFormParameters |
protected MultivaluedMap<String,String> |
formParameters |
protected HttpHeaders |
httpHeaders |
protected String |
httpMethod |
protected javax.servlet.http.HttpServletRequest |
request |
protected UriInfo |
uri |
| Constructor and Description |
|---|
HttpRequest(javax.servlet.http.HttpServletRequest request,
HttpHeaders httpHeaders,
UriInfo uri,
String httpMethod) |
| Modifier and Type | Method and Description |
|---|---|
Object |
getAttribute(String attribute) |
Enumeration<String> |
getAttributeNames() |
String |
getContextPath() |
MultivaluedMap<String,String> |
getDecodedFormParameters() |
MultivaluedMap<String,String> |
getFormParameters() |
HttpHeaders |
getHttpHeaders() |
String |
getHttpMethod() |
InputStream |
getInputStream() |
Locale |
getLocale() |
MultivaluedMap<String,String> |
getPutDecodedFormParameters() |
MultivaluedMap<String,String> |
getPutFormParameters() |
String |
getRemoteAddr() |
String |
getRemoteHost() |
int |
getRemotePort() |
String |
getRemoteUser() |
javax.servlet.http.HttpSession |
getSession() |
javax.servlet.http.HttpSession |
getSession(boolean create) |
UriInfo |
getUri() |
Principal |
getUserPrincipal() |
boolean |
isUserInRole(String role) |
protected MultivaluedMap<String,String> |
parseForm(InputStream entityStream) |
void |
removeAttribute(String name) |
void |
setAttribute(String name,
Object value) |
protected final HttpHeaders httpHeaders
protected final javax.servlet.http.HttpServletRequest request
protected final UriInfo uri
protected final String httpMethod
protected MultivaluedMap<String,String> formParameters
protected MultivaluedMap<String,String> decodedFormParameters
public HttpRequest(javax.servlet.http.HttpServletRequest request,
HttpHeaders httpHeaders,
UriInfo uri,
String httpMethod)
public MultivaluedMap<String,String> getPutFormParameters()
public MultivaluedMap<String,String> getPutDecodedFormParameters()
public void removeAttribute(String name)
public Principal getUserPrincipal()
javax.servlet.http.HttpServletRequest.getUserPrincipal()public Enumeration<String> getAttributeNames()
public MultivaluedMap<String,String> getFormParameters()
public MultivaluedMap<String,String> getDecodedFormParameters()
public HttpHeaders getHttpHeaders()
public InputStream getInputStream()
public UriInfo getUri()
public String getHttpMethod()
protected MultivaluedMap<String,String> parseForm(InputStream entityStream) throws IOException
IOExceptionpublic javax.servlet.http.HttpSession getSession()
javax.servlet.http.HttpServletRequest.getSession()public javax.servlet.http.HttpSession getSession(boolean create)
javax.servlet.http.HttpServletRequest.getSession(boolean)public String getContextPath()
javax.servlet.http.HttpServletRequest.getContextPath()public Locale getLocale()
request.getLocale();public String getRemoteHost()
String container the remote host.request.getRemoteHost();public String getRemoteAddr()
String containing the fully
qualified name of the clientrequest.getRemoteAddr();public int getRemotePort()
int container the remote port.request.getRemotePort();public boolean isUserInRole(String role)
boolean indicating whether
the user making this request belongs to a given role;
false if the user has not been
authenticatedrequest.isUserInRole(String);public String getRemoteUser()
String container the remote user.request.getRemoteUser();Copyright © 2016. All rights reserved.