|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.ws.rest.spi.container.AbstractContainerRequest
public abstract class AbstractContainerRequest
An abstract implementation of ContainerRequest
.
Specific containers may extend this class and instances may be passed to
the runtime using the method WebApplication.handleRequest(com.sun.ws.rest.spi.container.ContainerRequest, com.sun.ws.rest.spi.container.ContainerResponse)
.
The following are required by a concrete implementation when constructed or before the instance is passed to the runtime.
getRequestHeaders()
and copying the container specific headers
to the returned MultivaluedMap
instance.
Field Summary | |
---|---|
protected java.net.URI |
baseUri
The base URI of the request. |
protected java.net.URI |
completeUri
The complete URI of a request, including the query and fragment components (if any). |
Fields inherited from interface javax.ws.rs.core.SecurityContext |
---|
BASIC_AUTH, CLIENT_CERT_AUTH, DIGEST_AUTH, FORM_AUTH |
Constructor Summary | |
---|---|
protected |
AbstractContainerRequest(MessageBodyContext bodyContext,
java.lang.String method,
java.io.InputStream entity)
|
Method Summary | ||
---|---|---|
void |
addTemplateValues(java.util.List<java.lang.String> names,
java.util.List<java.lang.String> values)
Add templates values to the HTTP request. |
|
javax.ws.rs.core.Response.ResponseBuilder |
evaluatePreconditions(java.util.Date lastModified)
|
|
javax.ws.rs.core.Response.ResponseBuilder |
evaluatePreconditions(java.util.Date lastModified,
javax.ws.rs.core.EntityTag eTag)
|
|
javax.ws.rs.core.Response.ResponseBuilder |
evaluatePreconditions(javax.ws.rs.core.EntityTag eTag)
|
|
java.net.URI |
getAbsolutePath()
|
|
javax.ws.rs.core.UriBuilder |
getAbsolutePathBuilder()
|
|
javax.ws.rs.core.MediaType |
getAcceptableMediaType(java.util.List<javax.ws.rs.core.MediaType> mediaTypes)
Select the first media type, from a list of media types, that is most acceptable according to the requested acceptable media types. |
|
java.util.List<javax.ws.rs.core.MediaType> |
getAcceptableMediaTypes()
|
|
java.lang.String |
getAuthenticationScheme()
|
|
java.net.URI |
getBaseUri()
|
|
javax.ws.rs.core.UriBuilder |
getBaseUriBuilder()
|
|
java.util.Map<java.lang.String,javax.ws.rs.core.Cookie> |
getCookies()
|
|
|
getEntity(java.lang.Class<T> type)
Get the request entity, returns null if the request does not contain an entity body. |
|
java.lang.String |
getHeaderValue(java.lang.String name)
Get a HTTP header value. |
|
java.lang.String |
getHttpMethod()
Get the HTTP method name |
|
java.lang.String |
getLanguage()
|
|
javax.ws.rs.core.MediaType |
getMediaType()
|
|
java.lang.String |
getPath()
|
|
java.lang.String |
getPath(boolean decode)
|
|
java.util.List<javax.ws.rs.core.PathSegment> |
getPathSegments()
|
|
java.util.List<javax.ws.rs.core.PathSegment> |
getPathSegments(boolean decode)
|
|
javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.String> |
getQueryParameters()
|
|
javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.String> |
getQueryParameters(boolean decode)
|
|
javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.String> |
getRequestHeaders()
|
|
java.net.URI |
getRequestUri()
|
|
javax.ws.rs.core.UriBuilder |
getRequestUriBuilder()
|
|
javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.String> |
getTemplateParameters()
|
|
javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.String> |
getTemplateParameters(boolean decode)
|
|
java.security.Principal |
getUserPrincipal()
|
|
boolean |
isSecure()
|
|
boolean |
isUserInRole(java.lang.String role)
|
|
javax.ws.rs.core.Variant |
selectVariant(java.util.List<javax.ws.rs.core.Variant> variants)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.net.URI baseUri
The scheme, user info, host and port components must be equivalent to the same componnents of the complete URI. The base URI must not contain the query and fragment components. The encoded path component of the complete URI must start with the encoded path component of the base URI. The encoded path component must end in a '/' character.
protected java.net.URI completeUri
Constructor Detail |
---|
protected AbstractContainerRequest(MessageBodyContext bodyContext, java.lang.String method, java.io.InputStream entity)
bodyContext
- the message body contextmethod
- the HTTP methodentity
- the InputStream of the request entityMethod Detail |
---|
public void addTemplateValues(java.util.List<java.lang.String> names, java.util.List<java.lang.String> values)
ContainerRequest
The template names and values must be in encoded form.
addTemplateValues
in interface ContainerRequest
names
- the list of template names.values
- the list of template values.public java.lang.String getHeaderValue(java.lang.String name)
HttpRequestContext
getHeaderValue
in interface HttpRequestContext
name
- the HTTP header
public <T> T getEntity(java.lang.Class<T> type)
HttpRequestContext
getEntity
in interface HttpRequestContext
type
- the type of entity
public java.lang.String getHttpMethod()
HttpRequestContext
getHttpMethod
in interface HttpRequestContext
public javax.ws.rs.core.MediaType getAcceptableMediaType(java.util.List<javax.ws.rs.core.MediaType> mediaTypes)
HttpRequestContext
getAcceptableMediaType
in interface HttpRequestContext
mediaTypes
- the list of media types
public java.lang.String getPath()
getPath
in interface javax.ws.rs.core.UriInfo
public java.lang.String getPath(boolean decode)
getPath
in interface javax.ws.rs.core.UriInfo
public java.util.List<javax.ws.rs.core.PathSegment> getPathSegments()
getPathSegments
in interface javax.ws.rs.core.UriInfo
public java.util.List<javax.ws.rs.core.PathSegment> getPathSegments(boolean decode)
getPathSegments
in interface javax.ws.rs.core.UriInfo
public java.net.URI getBaseUri()
getBaseUri
in interface javax.ws.rs.core.UriInfo
public javax.ws.rs.core.UriBuilder getBaseUriBuilder()
getBaseUriBuilder
in interface javax.ws.rs.core.UriInfo
public java.net.URI getAbsolutePath()
getAbsolutePath
in interface javax.ws.rs.core.UriInfo
public javax.ws.rs.core.UriBuilder getAbsolutePathBuilder()
getAbsolutePathBuilder
in interface javax.ws.rs.core.UriInfo
public java.net.URI getRequestUri()
getRequestUri
in interface javax.ws.rs.core.UriInfo
public javax.ws.rs.core.UriBuilder getRequestUriBuilder()
getRequestUriBuilder
in interface javax.ws.rs.core.UriInfo
public javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.String> getTemplateParameters()
getTemplateParameters
in interface javax.ws.rs.core.UriInfo
public javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.String> getTemplateParameters(boolean decode)
getTemplateParameters
in interface javax.ws.rs.core.UriInfo
public javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.String> getQueryParameters()
getQueryParameters
in interface javax.ws.rs.core.UriInfo
public javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.String> getQueryParameters(boolean decode)
getQueryParameters
in interface javax.ws.rs.core.UriInfo
public javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.String> getRequestHeaders()
getRequestHeaders
in interface javax.ws.rs.core.HttpHeaders
public java.util.List<javax.ws.rs.core.MediaType> getAcceptableMediaTypes()
getAcceptableMediaTypes
in interface javax.ws.rs.core.HttpHeaders
public javax.ws.rs.core.MediaType getMediaType()
getMediaType
in interface javax.ws.rs.core.HttpHeaders
public java.lang.String getLanguage()
getLanguage
in interface javax.ws.rs.core.HttpHeaders
public java.util.Map<java.lang.String,javax.ws.rs.core.Cookie> getCookies()
getCookies
in interface javax.ws.rs.core.HttpHeaders
public javax.ws.rs.core.Variant selectVariant(java.util.List<javax.ws.rs.core.Variant> variants)
selectVariant
in interface javax.ws.rs.core.Request
public javax.ws.rs.core.Response.ResponseBuilder evaluatePreconditions(javax.ws.rs.core.EntityTag eTag)
evaluatePreconditions
in interface javax.ws.rs.core.Request
public javax.ws.rs.core.Response.ResponseBuilder evaluatePreconditions(java.util.Date lastModified)
evaluatePreconditions
in interface javax.ws.rs.core.Request
public javax.ws.rs.core.Response.ResponseBuilder evaluatePreconditions(java.util.Date lastModified, javax.ws.rs.core.EntityTag eTag)
evaluatePreconditions
in interface javax.ws.rs.core.Request
public java.security.Principal getUserPrincipal()
getUserPrincipal
in interface javax.ws.rs.core.SecurityContext
public boolean isUserInRole(java.lang.String role)
isUserInRole
in interface javax.ws.rs.core.SecurityContext
public boolean isSecure()
isSecure
in interface javax.ws.rs.core.SecurityContext
public java.lang.String getAuthenticationScheme()
getAuthenticationScheme
in interface javax.ws.rs.core.SecurityContext
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |