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<String,String> |
getHeaders()
Get mutable map of HTTP headers.
|
InputStream |
getInputStream()
Get the input stream of the object to be read.
|
Object |
proceed()
Proceed to the next interceptor in the chain.
|
void |
setInputStream(InputStream is)
Set the input stream of the object to be read.
|
getAnnotations, getGenericType, getMediaType, getProperty, getPropertyNames, getType, removeProperty, setAnnotations, setGenericType, setMediaType, setProperty, setType
Object proceed() throws 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)
.IOException
- if an IO error arises or is thrown by the wrapped MessageBodyReader.readFrom
method.WebApplicationException
- thrown by the wrapped MessageBodyReader.readFrom
method.InputStream getInputStream()
void setInputStream(InputStream is)
is
- new input stream.MultivaluedMap<String,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.
Copyright © 2018,2020 Eclipse Foundation.
Use is subject to license terms.