Class AllowedContentEncodings

  • All Implemented Interfaces:
    ConduitWrapper<org.xnio.conduits.StreamSinkConduit>

    public class AllowedContentEncodings
    extends java.lang.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
    • Constructor Detail

      • AllowedContentEncodings

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

      • getCurrentContentEncoding

        public java.lang.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