|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.jersey.spi.container.ContainerRequest
com.sun.jersey.spi.container.AdaptingContainerRequest
com.sun.jersey.spi.container.CachedEntityContainerRequest
public class CachedEntityContainerRequest
A cached entity in-bound HTTP request that caches the entity instance obtained from the adapted container request.
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.
Field Summary |
---|
Fields inherited from class com.sun.jersey.spi.container.AdaptingContainerRequest |
---|
acr |
Fields inherited from interface javax.ws.rs.core.HttpHeaders |
---|
ACCEPT, 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 |
Fields inherited from interface javax.ws.rs.core.SecurityContext |
---|
BASIC_AUTH, CLIENT_CERT_AUTH, DIGEST_AUTH, FORM_AUTH |
Constructor Summary | |
---|---|
CachedEntityContainerRequest(ContainerRequest acr)
|
Method Summary | ||
---|---|---|
|
getEntity(java.lang.Class<T> type)
Get the entity or a cached instance. |
|
|
getEntity(java.lang.Class<T> type,
java.lang.reflect.Type genericType,
java.lang.annotation.Annotation[] as)
Get the entity or a cached instance. |
Methods inherited from class com.sun.jersey.spi.container.ContainerRequest |
---|
isTracingEnabled, trace |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CachedEntityContainerRequest(ContainerRequest acr)
Method Detail |
---|
public <T> T getEntity(java.lang.Class<T> type) throws java.lang.ClassCastException
getEntity
in interface HttpRequestContext
getEntity
in class AdaptingContainerRequest
type
- the type of entity
java.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 HttpRequestContext
getEntity
in class AdaptingContainerRequest
type
- 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 behvaiour of this method is undefned.as
- the annoations associated with the type
java.lang.ClassCastException
- if the cached entity cannot be cast to the
type requested.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |