@ConstrainedTo(value=SERVER) public class ServerCacheInterceptor extends Object implements javax.ws.rs.ext.WriterInterceptor, AsyncWriterInterceptor
| Modifier and Type | Field and Description |
|---|---|
protected ServerCache |
cache |
protected HttpRequest |
request |
protected javax.ws.rs.core.Request |
validation |
| Constructor and Description |
|---|
ServerCacheInterceptor(ServerCache cache) |
| Modifier and Type | Method and Description |
|---|---|
void |
aroundWriteTo(javax.ws.rs.ext.WriterInterceptorContext context) |
CompletionStage<Void> |
asyncAroundWriteTo(AsyncWriterInterceptorContext context)
Interceptor method wrapping calls to
AsyncMessageBodyWriter.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. |
static String |
byteArrayToHexString(byte[] bytes) |
protected String |
createHash(byte[] entity) |
protected ServerCache cache
@Context protected HttpRequest request
@Context protected javax.ws.rs.core.Request validation
public ServerCacheInterceptor(ServerCache cache)
public static String byteArrayToHexString(byte[] bytes)
protected String createHash(byte[] entity)
public void aroundWriteTo(javax.ws.rs.ext.WriterInterceptorContext context)
throws IOException,
javax.ws.rs.WebApplicationException
aroundWriteTo in interface javax.ws.rs.ext.WriterInterceptorIOExceptionjavax.ws.rs.WebApplicationExceptionpublic CompletionStage<Void> asyncAroundWriteTo(AsyncWriterInterceptorContext context)
AsyncWriterInterceptorAsyncMessageBodyWriter.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 from context.
Implementations of this method SHOULD explicitly call
AsyncWriterInterceptorContext.asyncProceed() to invoke the next interceptor in the chain,
and ultimately the wrapped AsyncMessageBodyWriter.asyncWriteTo method.asyncAroundWriteTo in interface AsyncWriterInterceptorcontext - invocation context.CompletionStage indicating completionCopyright © 2020 JBoss by Red Hat. All rights reserved.