javax.ws.rs.ext
Interface ReaderInterceptorContext<T>

Type Parameters:
T - Java type supported by corresponding message body reader
All Superinterfaces:
InterceptorContext<T>

public interface ReaderInterceptorContext<T>
extends InterceptorContext<T>

Context class used by 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.

Since:
2.0
Author:
Santiago Pericas-Geertsen, Bill Burke
See Also:
ReaderInterceptor, MessageBodyReader

Method Summary
 MultivaluedMap<String,String> getHeaders()
          Get mutable map of HTTP headers.
 InputStream getInputStream()
          Get the input stream of the object to be read.
 T proceed()
          Proceed to the next interceptor in the chain.
 void setInputStream(InputStream is)
          Update the input stream of the object to be read.
 
Methods inherited from interface javax.ws.rs.ext.InterceptorContext
getAnnotations, getGenericType, getMediaType, getProperties, getType, setAnnotations, setGenericType, setMediaType, setType
 

Method Detail

proceed

T proceed()
          throws IOException
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 MessageBodyReader.readFrom(java.lang.Class, java.lang.reflect.Type, java.lang.annotation.Annotation[], javax.ws.rs.core.MediaType, javax.ws.rs.core.MultivaluedMap, java.io.InputStream).

Returns:
result of next interceptor invoked
Throws:
IOException - if an IO error arises

getInputStream

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

Returns:
input stream of the object to be read

setInputStream

void setInputStream(InputStream is)
Update the input stream of the object to be read. For example, by wrapping it with another input stream

Parameters:
is - new input stream

getHeaders

MultivaluedMap<String,String> getHeaders()
Get mutable map of HTTP headers.

Returns:
map of HTTP headers


Copyright © 2007-2012 Oracle Corporation. All Rights Reserved. Use is subject to license terms.