|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
T - Java type supported by corresponding message body providerpublic interface InterceptorContext<T>
Context shared by message body interceptors that can be used to wrap
calls to MessageBodyReader.readFrom(java.lang.Class and
MessageBodyWriter.writeTo(T, java.lang.Class>, java.lang.reflect.Type, java.lang.annotation.Annotation[], javax.ws.rs.core.MediaType, javax.ws.rs.core.MultivaluedMap. The getters and
setters in this context class correspond to the parameters in
the aforementioned methods.
ReaderInterceptor,
WriterInterceptor,
ReaderInterceptorContext,
WriterInterceptorContext| Method Summary | |
|---|---|
Annotation[] |
getAnnotations()
Get annotations on the formal declaration of the resource method parameter that is the target of the message body conversion. |
Type |
getGenericType()
Get the type of the object to be produced or written. |
MediaType |
getMediaType()
Get media type of HTTP entity. |
Map<String,Object> |
getProperties()
Get a mutable map of request-scoped properties that can be used for communication between different request/response processing components. |
Class<T> |
getType()
Get Java type supported by corresponding message body provider. |
void |
setAnnotations(Annotation[] annotations)
Update annotations on the formal declaration of the resource method parameter that is the target of the message body conversion. |
void |
setGenericType(Type genericType)
Update type of the object to be produced or written. |
void |
setMediaType(MediaType mediaType)
Update media type of HTTP entity. |
void |
setType(Class<T> type)
Update Java type before calling message body provider. |
| Method Detail |
|---|
Map<String,Object> getProperties()
null. In the scope of a single request/response processing,
a same property map instance is shared by the following methods:
A request-scoped property is an application-defined property that may be
added, removed or modified by any of the components (user, filter, interceptor etc.)
that participate in a given request/response processing flow.
On the client side, this property map is initialized by calling
Configuration.setProperties(java.util.Map) or
Configuration.setProperty(java.lang.String, java.lang.Object)
on the configuration object associated with the corresponding
request invocation.
On the server side, specifying the initial values is implementation-specific.
If there are no initial properties set, the request-scoped property map is
initialized to an empty map.
ConfigurationAnnotation[] getAnnotations()
void setAnnotations(Annotation[] annotations)
annotations - annotations for the resource method parameterClass<T> getType()
void setType(Class<T> type)
type - java type for providerType getGenericType()
void setGenericType(Type genericType)
genericType - new type for objectMediaType getMediaType()
void setMediaType(MediaType mediaType)
mediaType - new type for HTTP entity
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||