Class AbstractWriterInterceptorContext
- java.lang.Object
-
- org.jboss.resteasy.core.interception.jaxrs.AbstractWriterInterceptorContext
-
- All Implemented Interfaces:
jakarta.ws.rs.ext.InterceptorContext,jakarta.ws.rs.ext.WriterInterceptorContext,AsyncWriterInterceptorContext
- Direct Known Subclasses:
ClientWriterInterceptorContext,ServerWriterInterceptorContext
public abstract class AbstractWriterInterceptorContext extends Object implements jakarta.ws.rs.ext.WriterInterceptorContext, AsyncWriterInterceptorContext
- Version:
- $Revision: 1 $
- Author:
- Bill Burke
-
-
Field Summary
Fields Modifier and Type Field Description protected Annotation[]annotationsprotected Objectentityprotected TypegenericTypeprotected jakarta.ws.rs.core.MultivaluedMap<String,Object>headersprotected intindexprotected jakarta.ws.rs.ext.WriterInterceptor[]interceptorsprotected jakarta.ws.rs.core.MediaTypemediaTypeprotected OutputStreamoutputStreamprotected ResteasyProviderFactoryproviderFactoryprotected booleanrequireAsyncIOprotected RESTEasyTracingLoggertracingLoggerprotected Classtype
-
Constructor Summary
Constructors Constructor Description AbstractWriterInterceptorContext(jakarta.ws.rs.ext.WriterInterceptor[] interceptors, Annotation[] annotations, Object entity, Type genericType, jakarta.ws.rs.core.MediaType mediaType, Class type, OutputStream outputStream, ResteasyProviderFactory providerFactory, jakarta.ws.rs.core.MultivaluedMap<String,Object> headers)Deprecated.AbstractWriterInterceptorContext(jakarta.ws.rs.ext.WriterInterceptor[] interceptors, Annotation[] annotations, Object entity, Type genericType, jakarta.ws.rs.core.MediaType mediaType, Class type, OutputStream outputStream, ResteasyProviderFactory providerFactory, jakarta.ws.rs.core.MultivaluedMap<String,Object> headers, RESTEasyTracingLogger logger)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description CompletionStage<Void>asyncProceed()Annotation[]getAnnotations()AsyncOutputStreamgetAsyncOutputStream()ObjectgetEntity()TypegetGenericType()jakarta.ws.rs.core.MultivaluedMap<String,Object>getHeaders()jakarta.ws.rs.core.MediaTypegetMediaType()OutputStreamgetOutputStream()intgetProcessedInterceptorCount()CompletionStage<Void>getStarted()ClassgetType()protected jakarta.ws.rs.ext.MessageBodyWritergetWriter()protected booleanpreferAsyncIo()voidproceed()protected abstract jakarta.ws.rs.ext.MessageBodyWriterresolveWriter()voidsetAnnotations(Annotation[] annotations)voidsetAsyncOutputStream(AsyncOutputStream asyncOutputStream)voidsetEntity(Object entity)voidsetGenericType(Type genericType)voidsetMediaType(jakarta.ws.rs.core.MediaType mediaType)voidsetOutputStream(OutputStream outputStream)voidsetType(Class type)CompletionStage<Void>syncProceed()protected voidtraceAfter(jakarta.ws.rs.ext.WriterInterceptor interceptor)protected voidtraceBefore(jakarta.ws.rs.ext.WriterInterceptor interceptor)protected CompletionStage<Void>writeTo(jakarta.ws.rs.ext.MessageBodyWriter writer)protected CompletionStage<Void>writeTo(AsyncMessageBodyWriter writer)
-
-
-
Field Detail
-
tracingLogger
protected RESTEasyTracingLogger tracingLogger
-
interceptors
protected jakarta.ws.rs.ext.WriterInterceptor[] interceptors
-
requireAsyncIO
protected boolean requireAsyncIO
-
entity
protected Object entity
-
type
protected Class type
-
genericType
protected Type genericType
-
annotations
protected Annotation[] annotations
-
mediaType
protected jakarta.ws.rs.core.MediaType mediaType
-
outputStream
protected OutputStream outputStream
-
index
protected int index
-
providerFactory
protected ResteasyProviderFactory providerFactory
-
-
Constructor Detail
-
AbstractWriterInterceptorContext
@Deprecated public AbstractWriterInterceptorContext(jakarta.ws.rs.ext.WriterInterceptor[] interceptors, Annotation[] annotations, Object entity, Type genericType, jakarta.ws.rs.core.MediaType mediaType, Class type, OutputStream outputStream, ResteasyProviderFactory providerFactory, jakarta.ws.rs.core.MultivaluedMap<String,Object> headers)
Deprecated.
-
AbstractWriterInterceptorContext
public AbstractWriterInterceptorContext(jakarta.ws.rs.ext.WriterInterceptor[] interceptors, Annotation[] annotations, Object entity, Type genericType, jakarta.ws.rs.core.MediaType mediaType, Class type, OutputStream outputStream, ResteasyProviderFactory providerFactory, jakarta.ws.rs.core.MultivaluedMap<String,Object> headers, RESTEasyTracingLogger logger)
-
-
Method Detail
-
getProcessedInterceptorCount
public int getProcessedInterceptorCount()
-
getEntity
public Object getEntity()
- Specified by:
getEntityin interfaceAsyncWriterInterceptorContext- Specified by:
getEntityin interfacejakarta.ws.rs.ext.WriterInterceptorContext
-
setEntity
public void setEntity(Object entity)
- Specified by:
setEntityin interfaceAsyncWriterInterceptorContext- Specified by:
setEntityin interfacejakarta.ws.rs.ext.WriterInterceptorContext
-
getType
public Class getType()
- Specified by:
getTypein interfacejakarta.ws.rs.ext.InterceptorContext
-
setType
public void setType(Class type)
- Specified by:
setTypein interfacejakarta.ws.rs.ext.InterceptorContext
-
getGenericType
public Type getGenericType()
- Specified by:
getGenericTypein interfacejakarta.ws.rs.ext.InterceptorContext
-
setGenericType
public void setGenericType(Type genericType)
- Specified by:
setGenericTypein interfacejakarta.ws.rs.ext.InterceptorContext
-
getAnnotations
public Annotation[] getAnnotations()
- Specified by:
getAnnotationsin interfacejakarta.ws.rs.ext.InterceptorContext
-
setAnnotations
public void setAnnotations(Annotation[] annotations)
- Specified by:
setAnnotationsin interfacejakarta.ws.rs.ext.InterceptorContext
-
getMediaType
public jakarta.ws.rs.core.MediaType getMediaType()
- Specified by:
getMediaTypein interfacejakarta.ws.rs.ext.InterceptorContext
-
setMediaType
public void setMediaType(jakarta.ws.rs.core.MediaType mediaType)
- Specified by:
setMediaTypein interfacejakarta.ws.rs.ext.InterceptorContext
-
getHeaders
public jakarta.ws.rs.core.MultivaluedMap<String,Object> getHeaders()
- Specified by:
getHeadersin interfaceAsyncWriterInterceptorContext- Specified by:
getHeadersin interfacejakarta.ws.rs.ext.WriterInterceptorContext
-
getOutputStream
public OutputStream getOutputStream()
- Specified by:
getOutputStreamin interfacejakarta.ws.rs.ext.WriterInterceptorContext
-
setOutputStream
public void setOutputStream(OutputStream outputStream)
- Specified by:
setOutputStreamin interfacejakarta.ws.rs.ext.WriterInterceptorContext
-
setAsyncOutputStream
public void setAsyncOutputStream(AsyncOutputStream asyncOutputStream)
- Specified by:
setAsyncOutputStreamin interfaceAsyncWriterInterceptorContext
-
getAsyncOutputStream
public AsyncOutputStream getAsyncOutputStream()
- Specified by:
getAsyncOutputStreamin interfaceAsyncWriterInterceptorContext
-
getStarted
public CompletionStage<Void> getStarted()
-
preferAsyncIo
protected boolean preferAsyncIo()
-
asyncProceed
public CompletionStage<Void> asyncProceed()
- Specified by:
asyncProceedin interfaceAsyncWriterInterceptorContext
-
proceed
public void proceed() throws IOException, jakarta.ws.rs.WebApplicationException- Specified by:
proceedin interfacejakarta.ws.rs.ext.WriterInterceptorContext- Throws:
IOExceptionjakarta.ws.rs.WebApplicationException
-
syncProceed
public CompletionStage<Void> syncProceed() throws IOException, jakarta.ws.rs.WebApplicationException
- Throws:
IOExceptionjakarta.ws.rs.WebApplicationException
-
traceBefore
protected final void traceBefore(jakarta.ws.rs.ext.WriterInterceptor interceptor)
-
traceAfter
protected final void traceAfter(jakarta.ws.rs.ext.WriterInterceptor interceptor)
-
writeTo
protected CompletionStage<Void> writeTo(jakarta.ws.rs.ext.MessageBodyWriter writer) throws IOException
- Throws:
IOException
-
writeTo
protected CompletionStage<Void> writeTo(AsyncMessageBodyWriter writer)
-
getWriter
protected jakarta.ws.rs.ext.MessageBodyWriter getWriter()
-
resolveWriter
protected abstract jakarta.ws.rs.ext.MessageBodyWriter resolveWriter()
-
-