public final class WriterInterceptorExecutor extends Object implements WriterInterceptorContext
message body writer execution interceptor is inserted,
which writes entity to the output stream provided by the chain.| Constructor and Description |
|---|
WriterInterceptorExecutor(Object entity,
Class<?> rawType,
Type type,
Annotation[] annotations,
MediaType mediaType,
MultivaluedMap<String,Object> headers,
PropertiesDelegate propertiesDelegate,
OutputStream entityStream,
MessageBodyWorkers workers,
Iterable<WriterInterceptor> writerInterceptors)
Constructs a new executor to write given type to provided
entityStream. |
| Modifier and Type | Method and Description |
|---|---|
Annotation[] |
getAnnotations() |
Object |
getEntity() |
Type |
getGenericType() |
MultivaluedMap<String,Object> |
getHeaders() |
MediaType |
getMediaType() |
WriterInterceptor |
getNextInterceptor()
Returns next
interceptor in the chain. |
OutputStream |
getOutputStream() |
Object |
getProperty(String name) |
Collection<String> |
getPropertyNames() |
Class |
getType() |
void |
proceed()
Starts the interceptor chain execution.
|
void |
removeProperty(String name) |
void |
setAnnotations(Annotation[] annotations) |
void |
setEntity(Object entity) |
void |
setGenericType(Type genericType) |
void |
setMediaType(MediaType mediaType) |
void |
setOutputStream(OutputStream os) |
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 WriterInterceptorExecutor(Object entity, Class<?> rawType, Type type, Annotation[] annotations, MediaType mediaType, MultivaluedMap<String,Object> headers, PropertiesDelegate propertiesDelegate, OutputStream entityStream, MessageBodyWorkers workers, Iterable<WriterInterceptor> writerInterceptors)
entityStream.entity - entity object to be processed.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 HTTP headers associated with HTTP entity.propertiesDelegate - request-scoped properties delegate.entityStream - InputStream from which an entity will be read. The stream is not
closed after reading the entity.workers - Message body workers.writerInterceptors - Writer interceptor that are to be used to intercept the writing of an entity. The interceptors
will be executed in the same order as given in this parameter.public WriterInterceptor getNextInterceptor()
interceptor in the chain. Stateful method.public void proceed()
throws IOException
proceed in interface WriterInterceptorContextIOExceptionpublic Object getEntity()
getEntity in interface WriterInterceptorContextpublic void setEntity(Object entity)
setEntity in interface WriterInterceptorContextpublic OutputStream getOutputStream()
getOutputStream in interface WriterInterceptorContextpublic void setOutputStream(OutputStream os)
setOutputStream in interface WriterInterceptorContextpublic MultivaluedMap<String,Object> getHeaders()
getHeaders in interface WriterInterceptorContextpublic 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-2013, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.