public interface ReaderInterceptorContext extends InterceptorContext
ReaderInterceptor
to intercept calls to (@link
jakarta.ws.rs.ext.MessageBodyReader#readFrom}. The getters and setters in this context class correspond to the
parameters of the intercepted method.ReaderInterceptor
,
MessageBodyReader
Modifier and Type | Method and Description |
---|---|
MultivaluedMap<java.lang.String,java.lang.String> |
getHeaders()
Get mutable map of HTTP headers.
|
java.io.InputStream |
getInputStream()
Get the input stream of the object to be read.
|
java.lang.Object |
proceed()
Proceed to the next interceptor in the chain.
|
void |
setInputStream(java.io.InputStream is)
Set the input stream of the object to be read.
|
getAnnotations, getGenericType, getMediaType, getProperty, getPropertyNames, getType, removeProperty, setAnnotations, setGenericType, setMediaType, setProperty, setType
java.lang.Object proceed() throws java.io.IOException, WebApplicationException
MessageBodyReader.readFrom(java.lang.Class<T>, java.lang.reflect.Type, java.lang.annotation.Annotation[], jakarta.ws.rs.core.MediaType, jakarta.ws.rs.core.MultivaluedMap<java.lang.String, java.lang.String>, java.io.InputStream)
.java.io.IOException
- if an IO error arises or is thrown by the wrapped MessageBodyReader.readFrom
method.WebApplicationException
- thrown by the wrapped MessageBodyReader.readFrom
method.java.io.InputStream getInputStream()
void setInputStream(java.io.InputStream is)
is
- new input stream.MultivaluedMap<java.lang.String,java.lang.String> getHeaders()
Note that while the headers are mutable, a reader interceptor
should typically roll-back
any header modifications once the call to context.proceed()
returns, to avoid externally visible
side-effects of the interceptor invocation.