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 Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionAllowedContentEncodings
(HttpServerExchange exchange, List<io.undertow.server.handlers.encoding.EncodingMapping> encodings) -
Method Summary
Modifier and TypeMethodDescriptionio.undertow.server.handlers.encoding.EncodingMapping
boolean
boolean
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.org.xnio.conduits.StreamSinkConduit
wrap
(ConduitFactory<org.xnio.conduits.StreamSinkConduit> factory, HttpServerExchange exchange) Wrap the conduit.
-
Field Details
-
ATTACHMENT_KEY
-
-
Constructor Details
-
AllowedContentEncodings
public AllowedContentEncodings(HttpServerExchange exchange, List<io.undertow.server.handlers.encoding.EncodingMapping> encodings)
-
-
Method Details
-
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 returnnull
. If no wrapping is desired, the original conduit should be returned.- Specified by:
wrap
in interfaceConduitWrapper<org.xnio.conduits.StreamSinkConduit>
- Parameters:
factory
- the original conduitexchange
- the in-flight HTTP exchange- Returns:
- the replacement conduit
-