Class EncodingFilter

java.lang.Object
org.glassfish.jersey.client.filter.EncodingFilter
All Implemented Interfaces:
javax.ws.rs.client.ClientRequestFilter

public final class EncodingFilter extends Object implements javax.ws.rs.client.ClientRequestFilter
Client filter adding support for content encoding. The filter adds list of supported encodings to the Accept-Header values. Supported encodings are determined by looking up all the ContentEncoder implementations registered in the corresponding client configuration.

If ClientProperties.USE_ENCODING client property is set, the filter will add Content-Encoding header with the value of the property, unless Content-Encoding header has already been set.

  • Field Details

    • injectionManager

      @Inject private InjectionManager injectionManager
    • supportedEncodings

      private volatile List<Object> supportedEncodings
  • Constructor Details

    • EncodingFilter

      public EncodingFilter()
  • Method Details

    • filter

      public void filter(javax.ws.rs.client.ClientRequestContext request) throws IOException
      Specified by:
      filter in interface javax.ws.rs.client.ClientRequestFilter
      Throws:
      IOException
    • getSupportedEncodings

      List<Object> getSupportedEncodings()