Package org.jboss.resteasy.spi
Interface AsyncWriterInterceptor
-
- All Superinterfaces:
javax.ws.rs.ext.WriterInterceptor
- All Known Implementing Classes:
DigitalSigningInterceptor
,Jackson2JsonpInterceptor
,ServerCacheInterceptor
,ServerContentEncodingAnnotationFilter
public interface AsyncWriterInterceptor extends javax.ws.rs.ext.WriterInterceptor
Writer interceptors which support async IO.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description CompletionStage<Void>
asyncAroundWriteTo(AsyncWriterInterceptorContext context)
Interceptor method wrapping calls toAsyncMessageBodyWriter.asyncWriteTo(T, java.lang.Class<?>, java.lang.reflect.Type, java.lang.annotation.Annotation[], javax.ws.rs.core.MediaType, javax.ws.rs.core.MultivaluedMap<java.lang.String, java.lang.Object>, org.jboss.resteasy.spi.AsyncOutputStream)
method.
-
-
-
Method Detail
-
asyncAroundWriteTo
CompletionStage<Void> asyncAroundWriteTo(AsyncWriterInterceptorContext context)
Interceptor method wrapping calls toAsyncMessageBodyWriter.asyncWriteTo(T, java.lang.Class<?>, java.lang.reflect.Type, java.lang.annotation.Annotation[], javax.ws.rs.core.MediaType, javax.ws.rs.core.MultivaluedMap<java.lang.String, java.lang.Object>, org.jboss.resteasy.spi.AsyncOutputStream)
method. The parameters of the wrapped method called are available fromcontext
. Implementations of this method SHOULD explicitly callAsyncWriterInterceptorContext.asyncProceed()
to invoke the next interceptor in the chain, and ultimately the wrappedAsyncMessageBodyWriter.asyncWriteTo
method.- Parameters:
context
- invocation context.- Returns:
- a
CompletionStage
indicating completion - Throws:
IOException
- if an IO error arises or is thrown by the wrappedAsyncMessageBodyWriter.asyncWriteTo
method, in the returnedCompletionStage
.javax.ws.rs.WebApplicationException
- thrown by the wrappedAsyncMessageBodyWriter.asyncWriteTo
method, in the returnedCompletionStage
.
-
-