public final class ReaderInterceptorExecutor extends Object implements ReaderInterceptorContext
message body reader execution interceptor is inserted,
which finally reads an entity from the output stream provided by the chain.| Modifier and Type | Field and Description |
|---|---|
static String |
INTERCEPTORS
Defines property, which is used to pass a list of reader interceptors
to the executor via
PropertiesDelegate. |
| Constructor and Description |
|---|
ReaderInterceptorExecutor(Class<?> rawType,
Type type,
Annotation[] annotations,
MediaType mediaType,
MultivaluedMap<String,String> headers,
PropertiesDelegate propertiesDelegate,
InputStream inputStream,
MessageBodyWorkers workers,
boolean intercept)
Constructs a new executor to read given type from provided
entityStream. |
| Modifier and Type | Method and Description |
|---|---|
Annotation[] |
getAnnotations() |
Type |
getGenericType() |
MultivaluedMap<String,String> |
getHeaders() |
InputStream |
getInputStream() |
MediaType |
getMediaType() |
ReaderInterceptor |
getNextInterceptor()
Returns next
interceptor in the chain. |
Object |
getProperty(String name) |
Collection<String> |
getPropertyNames() |
Class |
getType() |
Object |
proceed()
Starts the interceptor chain execution.
|
void |
removeProperty(String name) |
void |
setAnnotations(Annotation[] annotations) |
void |
setGenericType(Type genericType) |
void |
setInputStream(InputStream is) |
void |
setMediaType(MediaType mediaType) |
void |
setProperty(String name,
Object object) |
void |
setType(Class type) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetAnnotations, getGenericType, getMediaType, getProperty, getPropertyNames, getType, removeProperty, setAnnotations, setGenericType, setMediaType, setProperty, setTypepublic static final String INTERCEPTORS
PropertiesDelegate.public ReaderInterceptorExecutor(Class<?> rawType, Type type, Annotation[] annotations, MediaType mediaType, MultivaluedMap<String,String> headers, PropertiesDelegate propertiesDelegate, InputStream inputStream, MessageBodyWorkers workers, boolean intercept)
entityStream.
List of interceptors to be used is taken from given workers instance
unless "jersey.runtime.reader.interceptors" property is set in propertiesDelegate.
If such a property is present, the executor tries to cast it to List<ReaderInterceptor>
and the list is then used to build the interceptor chain.rawType - raw Java entity type.type - generic Java entity type.annotations - array of annotations on the declaration of the artifact
that will be initialized with the produced instance. E.g. if the message
body is to be converted into a method parameter, this will be the
annotations on that parameter returned by
Method.getParameterAnnotations.mediaType - media type of the HTTP entity.headers - mutable message headers.propertiesDelegate - request-scoped properties delegate.inputStream - entity input stream.workers - Message body workers.intercept - if set to true, user interceptors will be executed. Otherwise only
exception wrapping interceptor will
be executed on the client side.public ReaderInterceptor getNextInterceptor()
interceptor in the chain. Stateful method.public Object proceed() throws IOException
proceed in interface ReaderInterceptorContextIOExceptionpublic InputStream getInputStream()
getInputStream in interface ReaderInterceptorContextpublic void setInputStream(InputStream is)
setInputStream in interface ReaderInterceptorContextpublic MultivaluedMap<String,String> getHeaders()
getHeaders in interface ReaderInterceptorContextpublic Object getProperty(String name)
getProperty in interface InterceptorContextpublic Collection<String> getPropertyNames()
getPropertyNames in interface InterceptorContextpublic void setProperty(String name, Object object)
setProperty in interface InterceptorContextpublic void removeProperty(String name)
removeProperty in interface InterceptorContextpublic Annotation[] getAnnotations()
getAnnotations in interface InterceptorContextpublic void setAnnotations(Annotation[] annotations)
setAnnotations in interface InterceptorContextpublic Class getType()
getType in interface InterceptorContextpublic void setType(Class type)
setType in interface InterceptorContextpublic Type getGenericType()
getGenericType in interface InterceptorContextpublic void setGenericType(Type genericType)
setGenericType in interface InterceptorContextpublic MediaType getMediaType()
getMediaType in interface InterceptorContextpublic void setMediaType(MediaType mediaType)
setMediaType in interface InterceptorContextCopyright © 2007-2012 Oracle Corporation. All Rights Reserved. Use is subject to license terms.