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_AUTHENTICATE| Constructor and Description |
|---|
CachedEntityContainerRequest(ContainerRequest acr) |
| Modifier and Type | Method and Description |
|---|---|
<T> T |
getEntity(Class<T> type)
Get the entity or a cached instance.
|
<T> T |
getEntity(Class<T> type,
Type genericType,
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(Class<T> type) throws ClassCastException
getEntity in interface HttpRequestContextgetEntity in class AdaptingContainerRequesttype - the type of entityClassCastException - if the cached entity cannot be cast to the
type requested.public <T> T getEntity(Class<T> type, Type genericType, Annotation[] as) throws 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 typeClassCastException - if the cached entity cannot be cast to the
type requested.Copyright © 2014 Oracle Corporation. All rights reserved.