Package org.jboss.resteasy.plugins.interceptors

## Class ServerContentEncodingAnnotationFilter

- java.lang.Object
- - org.jboss.resteasy.plugins.interceptors.ServerContentEncodingAnnotationFilter

- All Implemented Interfaces:
    `javax.ws.rs.ext.WriterInterceptor`, `AsyncWriterInterceptor`

      @ConstrainedTo(SERVER)
      @Priority(3000)
      public class ServerContentEncodingAnnotationFilter
      extends Object
      implements AsyncWriterInterceptor

  Version:
    $Revision: 1 $
  Author:
    Bill Burke

- - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `protected HttpRequest` | `request` |

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `ServerContentEncodingAnnotationFilter​(Set<String> encodings)` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | 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.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### request

          @Context
          protected HttpRequest request

  - ### Constructor Detail

    - #### ServerContentEncodingAnnotationFilter

          public ServerContentEncodingAnnotationFilter​(Set<String> encodings)

  - ### Method Detail

    - #### aroundWriteTo

          public void aroundWriteTo​(javax.ws.rs.ext.WriterInterceptorContext context)
                             throws IOException,
                                    javax.ws.rs.WebApplicationException

      Specified by:
        `aroundWriteTo` in interface `javax.ws.rs.ext.WriterInterceptor`
      Throws:
        `IOException`
        `javax.ws.rs.WebApplicationException`

    - #### asyncAroundWriteTo

          public CompletionStage<Void> asyncAroundWriteTo​(AsyncWriterInterceptorContext context)

      Description copied from interface: `AsyncWriterInterceptor`
      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. 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.
      Specified by:
        `asyncAroundWriteTo` in interface `AsyncWriterInterceptor`
      Parameters:
        `context` - invocation context.
      Returns:
        a `CompletionStage` indicating completion