public final class WriterInterceptorExecutor extends Object implements javax.ws.rs.ext.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,
javax.ws.rs.core.MediaType mediaType,
javax.ws.rs.core.MultivaluedMap<String,Object> headers,
PropertiesDelegate propertiesDelegate,
OutputStream entityStream,
MessageBodyWorkers workers,
Iterable<javax.ws.rs.ext.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() |
javax.ws.rs.core.MultivaluedMap<String,Object> |
getHeaders() |
javax.ws.rs.core.MediaType |
getMediaType() |
javax.ws.rs.ext.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(javax.ws.rs.core.MediaType mediaType) |
void |
setOutputStream(OutputStream os) |
void |
setProperty(String name,
Object object) |
void |
setType(Class type) |
public WriterInterceptorExecutor(Object entity, Class<?> rawType, Type type, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType, javax.ws.rs.core.MultivaluedMap<String,Object> headers, PropertiesDelegate propertiesDelegate, OutputStream entityStream, MessageBodyWorkers workers, Iterable<javax.ws.rs.ext.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 javax.ws.rs.ext.WriterInterceptor getNextInterceptor()
interceptor in the chain. Stateful method.public void proceed()
throws IOException
proceed in interface javax.ws.rs.ext.WriterInterceptorContextIOExceptionpublic Object getEntity()
getEntity in interface javax.ws.rs.ext.WriterInterceptorContextpublic void setEntity(Object entity)
setEntity in interface javax.ws.rs.ext.WriterInterceptorContextpublic OutputStream getOutputStream()
getOutputStream in interface javax.ws.rs.ext.WriterInterceptorContextpublic void setOutputStream(OutputStream os)
setOutputStream in interface javax.ws.rs.ext.WriterInterceptorContextpublic javax.ws.rs.core.MultivaluedMap<String,Object> getHeaders()
getHeaders in interface javax.ws.rs.ext.WriterInterceptorContextpublic Object getProperty(String name)
getProperty in interface javax.ws.rs.ext.InterceptorContextpublic Collection<String> getPropertyNames()
getPropertyNames in interface javax.ws.rs.ext.InterceptorContextpublic void setProperty(String name, Object object)
setProperty in interface javax.ws.rs.ext.InterceptorContextpublic void removeProperty(String name)
removeProperty in interface javax.ws.rs.ext.InterceptorContextpublic Annotation[] getAnnotations()
getAnnotations in interface javax.ws.rs.ext.InterceptorContextpublic void setAnnotations(Annotation[] annotations)
setAnnotations in interface javax.ws.rs.ext.InterceptorContextpublic Class getType()
getType in interface javax.ws.rs.ext.InterceptorContextpublic void setType(Class type)
setType in interface javax.ws.rs.ext.InterceptorContextpublic Type getGenericType()
getGenericType in interface javax.ws.rs.ext.InterceptorContextpublic void setGenericType(Type genericType)
setGenericType in interface javax.ws.rs.ext.InterceptorContextpublic javax.ws.rs.core.MediaType getMediaType()
getMediaType in interface javax.ws.rs.ext.InterceptorContextpublic void setMediaType(javax.ws.rs.core.MediaType mediaType)
setMediaType in interface javax.ws.rs.ext.InterceptorContextCopyright © 2007-2013, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.