public class CachedEntityContainerRequest extends AdaptingContainerRequest
A filter may utilize this class if it requires an entity of a specific type and that same type will also be utilized by a resource method.
acrVARY_HEADERACCEPT, ACCEPT_CHARSET, ACCEPT_ENCODING, ACCEPT_LANGUAGE, AUTHORIZATION, CACHE_CONTROL, CONTENT_ENCODING, CONTENT_LANGUAGE, CONTENT_LENGTH, CONTENT_LOCATION, CONTENT_TYPE, COOKIE, DATE, ETAG, EXPIRES, HOST, IF_MATCH, IF_MODIFIED_SINCE, IF_NONE_MATCH, IF_UNMODIFIED_SINCE, LAST_MODIFIED, LOCATION, SET_COOKIE, USER_AGENT, VARY, WWW_AUTHENTICATEBASIC_AUTH, CLIENT_CERT_AUTH, DIGEST_AUTH, FORM_AUTH| Constructor and Description |
|---|
CachedEntityContainerRequest(ContainerRequest acr) |
| Modifier and Type | Method and Description |
|---|---|
<T> T |
getEntity(java.lang.Class<T> type)
Get the entity or a cached instance.
|
<T> T |
getEntity(java.lang.Class<T> type,
java.lang.reflect.Type genericType,
java.lang.annotation.Annotation[] as)
Get the entity or a cached instance.
|
evaluatePreconditions, evaluatePreconditions, evaluatePreconditions, evaluatePreconditions, getAbsolutePath, getAbsolutePathBuilder, getAcceptableLanguages, getAcceptableMediaType, getAcceptableMediaTypes, getAcceptableMediaTypes, getAuthenticationScheme, getBaseUri, getBaseUriBuilder, getCookieNameValueMap, getCookies, getEntityInputStream, getFormParameters, getHeaderValue, getLanguage, getMediaType, getMessageBodyWorkers, getMethod, getPath, getPath, getPathSegments, getPathSegments, getProperties, getQueryParameters, getQueryParameters, getRequestHeader, getRequestHeaders, getRequestUri, getRequestUriBuilder, getSecurityContext, getUserPrincipal, isSecure, isTracingEnabled, isUserInRole, selectVariant, setEntityInputStream, setHeaders, setMethod, setSecurityContext, setUris, tracesetEntitypublic CachedEntityContainerRequest(ContainerRequest acr)
public <T> T getEntity(java.lang.Class<T> type)
throws java.lang.ClassCastException
getEntity in interface HttpRequestContextgetEntity in class AdaptingContainerRequesttype - the type of entityjava.lang.ClassCastException - if the cached entity cannot be cast to the
type requested.public <T> T getEntity(java.lang.Class<T> type,
java.lang.reflect.Type genericType,
java.lang.annotation.Annotation[] as)
throws java.lang.ClassCastException
getEntity in interface HttpRequestContextgetEntity in class AdaptingContainerRequesttype - the type of entitygenericType - type the generic type of entity, it is the responsibility
of the callee to ensure that the type and generic type are
consistent otherwise the behaviour of this method is undefined.as - the annotations associated with the typejava.lang.ClassCastException - if the cached entity cannot be cast to the
type requested.Copyright © 2016 Oracle Corporation. All Rights Reserved.