public interface WriterInterceptorContext extends InterceptorContext
WriterInterceptor
to intercept calls to
MessageBodyWriter.writeTo(T, java.lang.Class<?>, java.lang.reflect.Type, java.lang.annotation.Annotation[], jakarta.ws.rs.core.MediaType, jakarta.ws.rs.core.MultivaluedMap<java.lang.String, java.lang.Object>, java.io.OutputStream)
. The getters and setters in this context class correspond to the
parameters of the intercepted method.WriterInterceptor
,
MessageBodyWriter
Modifier and Type | Method and Description |
---|---|
Object |
getEntity()
Get object to be written as HTTP entity.
|
MultivaluedMap<String,Object> |
getHeaders()
Get mutable map of HTTP headers.
|
OutputStream |
getOutputStream()
Get the output stream for the object to be written.
|
void |
proceed()
Proceed to the next interceptor in the chain.
|
void |
setEntity(Object entity)
Update object to be written as HTTP entity.
|
void |
setOutputStream(OutputStream os)
Set a new output stream for the object to be written.
|
getAnnotations, getGenericType, getMediaType, getProperty, getPropertyNames, getType, removeProperty, setAnnotations, setGenericType, setMediaType, setProperty, setType
void proceed() throws IOException, WebApplicationException
MessageBodyWriter.writeTo(T, java.lang.Class<?>, java.lang.reflect.Type, java.lang.annotation.Annotation[], jakarta.ws.rs.core.MediaType, jakarta.ws.rs.core.MultivaluedMap<java.lang.String, java.lang.Object>, java.io.OutputStream)
method.IOException
- if an IO error arises or is thrown by the wrapped MessageBodyWriter.writeTo
method.WebApplicationException
- thrown by the wrapped MessageBodyWriter.writeTo
method.Object getEntity()
void setEntity(Object entity)
entity
- new object to be written.OutputStream getOutputStream()
void setOutputStream(OutputStream os)
os
- new output stream for the object to be written.MultivaluedMap<String,Object> getHeaders()
Copyright © 2018,2020 Eclipse Foundation.
Use is subject to license terms.