Top Description Methods
javax.ws.rs.ext

public Interface ReaderInterceptorContext

extends InterceptorContext
Imports
java.io.IOException, .InputStream, javax.ws.rs.WebApplicationException, javax.ws.rs.core.MultivaluedMap

Context class used by javax.ws.rs.ext.ReaderInterceptor to intercept calls to (@link javax.ws.rs.ext.MessageBodyReader#readFrom}. The getters and setters in this context class correspond to the parameters of the intercepted method.
Authors
Santiago Pericas-Geertsen, Bill Burke
Since
2.0
See Also
ReaderInterceptor, MessageBodyReader

Method Summary

Modifier and TypeMethod and Description
public MultivaluedMap<String, String>

Returns:

map of HTTP headers.
getHeaders
()

Get mutable map of HTTP headers.

public InputStream

Returns:

input stream of the object to be read.
getInputStream
()

Get the input stream of the object to be read.

public Object

Returns:

result of next interceptor invoked.
proceed
()

Proceed to the next interceptor in the chain.

public void
setInputStream(InputStream
new input stream.
is
)

Set the input stream of the object to be read.

Inherited from javax.ws.rs.ext.InterceptorContext:
getAnnotationsgetGenericTypegetMediaTypegetPropertygetPropertyNamesgetTyperemovePropertysetAnnotationssetGenericTypesetMediaTypesetPropertysetType

Method Detail

getHeadersback to summary
public MultivaluedMap<String, String> getHeaders()

Get mutable map of HTTP headers.

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.

Returns:MultivaluedMap<String, String>

map of HTTP headers.

getInputStreamback to summary
public InputStream getInputStream()

Get the input stream of the object to be read. The JAX-RS runtime is responsible for closing the input stream.

Returns:InputStream

input stream of the object to be read.

proceedback to summary
public Object proceed() throws IOException, WebApplicationException

Proceed to the next interceptor in the chain. Return the result of the next interceptor invoked. Interceptors MUST explicitly call this method to continue the execution chain; the call to this method in the last interceptor of the chain will invoke the wrapped javax.ws.rs.ext.MessageBodyReader#readFrom.

Returns:Object

result of next interceptor invoked.

Exceptions
IOException:
if an IO error arises or is thrown by the wrapped MessageBodyReader.readFrom method.
WebApplicationException:
thrown by the wrapped MessageBodyReader.readFrom method.
setInputStreamback to summary
public void setInputStream(InputStream is)

Set the input stream of the object to be read. For example, by wrapping it with another input stream. The JAX-RS runtime is responsible for closing the input stream that is set.

Parameters
is:InputStream

new input stream.