Class AllowedContentEncodings

java.lang.Object
io.undertow.server.handlers.encoding.AllowedContentEncodings
All Implemented Interfaces:
ConduitWrapper<org.xnio.conduits.StreamSinkConduit>

public class AllowedContentEncodings extends Object implements ConduitWrapper<org.xnio.conduits.StreamSinkConduit>
An attachment that provides information about the current content encoding that will be chosen for the response
Author:
Stuart Douglas
  • Field Details

  • Constructor Details

    • AllowedContentEncodings

      public AllowedContentEncodings(HttpServerExchange exchange, List<io.undertow.server.handlers.encoding.EncodingMapping> encodings)
  • Method Details

    • getCurrentContentEncoding

      public String getCurrentContentEncoding()
      Returns:
      The content encoding that will be set, given the current state of the HttpServerExchange
    • getEncoding

      public io.undertow.server.handlers.encoding.EncodingMapping getEncoding()
    • isIdentity

      public boolean isIdentity()
    • isNoEncodingsAllowed

      public boolean isNoEncodingsAllowed()
      If the list of allowed encodings was empty then it means that no encodings were allowed, and identity was explicitly prohibited with a q value of 0.
    • wrap

      public org.xnio.conduits.StreamSinkConduit wrap(ConduitFactory<org.xnio.conduits.StreamSinkConduit> factory, HttpServerExchange exchange)
      Description copied from interface: ConduitWrapper
      Wrap the conduit. The wrapper should not return null. If no wrapping is desired, the original conduit should be returned.
      Specified by:
      wrap in interface ConduitWrapper<org.xnio.conduits.StreamSinkConduit>
      Parameters:
      factory - the original conduit
      exchange - the in-flight HTTP exchange
      Returns:
      the replacement conduit