jakarta.ws.rs.ext.MessageBodyReader#readFrom and jakarta.ws.rs.ext.MessageBodyWriter#writeTo. The getters
and setters in this context class correspond to the parameters in the aforementioned methods.
ReaderInterceptor, WriterInterceptor, ReaderInterceptorContext, WriterInterceptorContext
| Modifier and Type | Method and Description |
|---|---|
| public Annotation[] | Returns: annotations declared on the artifact that initiated the intercepted entity provider invocation.Get an array of the annotations formally declared on the artifact that initiated the intercepted entity provider invocation. |
| public Type | Returns: type of object produced or writtenGet the type of the object to be produced or written. |
| public MediaType | |
| public Object | Returns: anObject containing the value of the property, or null if no property exists matching the
given name.a name)String specifying the name of the property.Returns the property with the given name registered in the current request/response exchange context, or |
| public Collection | Returns: an immutablecollection of property names.Returns an immutable |
| public Class | Returns: java type supported by providerGet Java type supported by corresponding message body provider. |
| public default boolean | Returns: true if this property is registered in the context, or false if no property exists matching
the given name.a name)String specifying the name of the property.Returns |
| public void | removeProperty(String
a name)String specifying the name of the property to be removed.Removes a property with the given name from the current request/response exchange context. |
| public void | setAnnotations(Annotation[]
updated annotations declarataion of the artifact that initiated the intercepted entity provider
invocation. Must not be annotations)null.Update annotations on the formal declaration of the artifact that initiated the intercepted entity provider invocation. |
| public void | setGenericType(Type
new type for object genericType)Update type of the object to be produced or written. |
| public void | |
| public void | setProperty(String
a name, Object String specifying the name of the property.an object)Object representing the property to be bound.Binds an object to a given property name in the current request/response exchange context. |
| public void |
| getAnnotations | back to summary |
|---|---|
| public Annotation[] getAnnotations() Get an array of the annotations formally declared on the artifact that initiated the intercepted entity provider
invocation.
E.g. if the message body is to be converted into a method parameter, this will be the annotations on that parameter
returned by
| |
| getGenericType | back to summary |
|---|---|
| public Type getGenericType() Get the type of the object to be produced or written.
| |
| getMediaType | back to summary |
|---|---|
| public MediaType getMediaType() Get media type of HTTP entity.
| |
| getProperty | back to summary |
|---|---|
| public Object getProperty(String name) Returns the property with the given name registered in the current request/response exchange context, or A property allows a JAX-RS filters and interceptors to exchange additional custom information not already provided by this interface.
A list of supported properties can be retrieved using
In a Servlet container, on the server side, the properties are backed by the
| |
| getPropertyNames | back to summary |
|---|---|
| public Collection Returns an immutable
Use the
In a Servlet container, the properties are synchronized with the
| |
| getType | back to summary |
|---|---|
| public Class Get Java type supported by corresponding message body provider.
| |
| hasProperty | back to summary |
|---|---|
| public default boolean hasProperty(String name) Returns
Use the
| |
| removeProperty | back to summary |
|---|---|
| public void removeProperty(String name) Removes a property with the given name from the current request/response exchange context. After removal, subsequent
calls to
In a Servlet container, on the server side, the properties are backed by the
| |
| setAnnotations | back to summary |
|---|---|
| public void setAnnotations(Annotation[] annotations) Update annotations on the formal declaration of the artifact that initiated the intercepted entity provider invocation. Calling this method has no effect in the client API.
| |
| setGenericType | back to summary |
|---|---|
| public void setGenericType(Type genericType) Update type of the object to be produced or written.
| |
| setMediaType | back to summary |
|---|---|
| public void setMediaType(MediaType mediaType) Update media type of HTTP entity.
| |
| setProperty | back to summary |
|---|---|
| public void setProperty(String name, Object object) Binds an object to a given property name in the current request/response exchange context. If the name specified is already used for a property, this method will replace the value of the property with the new value. A property allows a JAX-RS filters and interceptors to exchange additional custom information not already provided by this interface.
A list of supported properties can be retrieved using
If a
In a Servlet container, on the server side, the properties are backed by the | |
| setType | back to summary |
|---|---|
| public void setType(Class<?> type) Update Java type before calling message body provider.
| |