Top Description Fields Constructors Methods
io.undertow.server.handlers.encoding

public Class AllowedContentEncodings

extends Object
implements ConduitWrapper<StreamSinkConduit>
Class Inheritance
All Implemented Interfaces
io.undertow.server.ConduitWrapper
Imports
java.util.List, io.undertow.server.ConduitWrapper, .HttpServerExchange, io.undertow.util.AttachmentKey, .ConduitFactory, .Headers, .Methods, .StatusCodes, 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

Modifier and TypeField and Description
public static final AttachmentKey<AllowedContentEncodings>
private final List<EncodingMapping>
private final HttpServerExchange

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public String

Returns:

The content encoding that will be set, given the current state of the HttpServerExchange
getCurrentContentEncoding
()

public EncodingMapping
public boolean
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.

public StreamSinkConduit
wrap(final ConduitFactory<StreamSinkConduit>
the original conduit
factory
,
final HttpServerExchange
the in-flight HTTP exchange
exchange
)

Implements io.undertow.server.ConduitWrapper.wrap.

Wrap the conduit.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

ATTACHMENT_KEYback to summary
public static final AttachmentKey<AllowedContentEncodings> ATTACHMENT_KEY
encodingsback to summary
private final List<EncodingMapping> encodings
exchangeback to summary
private final HttpServerExchange exchange

Constructor Detail

AllowedContentEncodingsback to summary
public AllowedContentEncodings(final HttpServerExchange exchange, final List<EncodingMapping> encodings)

Method Detail

getCurrentContentEncodingback to summary
public String getCurrentContentEncoding()
Returns:String

The content encoding that will be set, given the current state of the HttpServerExchange

getEncodingback to summary
public EncodingMapping getEncoding()
isIdentityback to summary
public boolean isIdentity()
isNoEncodingsAllowedback to summary
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.

wrapback to summary
public StreamSinkConduit wrap(final ConduitFactory<StreamSinkConduit> factory, final HttpServerExchange exchange)

Implements io.undertow.server.ConduitWrapper.wrap.

Doc from io.undertow.server.ConduitWrapper.wrap.

Wrap the conduit. The wrapper should not return null. If no wrapping is desired, the original conduit should be returned.

Parameters
factory:ConduitFactory<StreamSinkConduit>

the original conduit

exchange:HttpServerExchange

the in-flight HTTP exchange

Returns:StreamSinkConduit

the replacement conduit

Annotations
@Override