Class EncodingNegotiator
java.lang.Object
org.apache.pekko.http.scaladsl.server.EncodingNegotiator
- 
Constructor SummaryConstructorsConstructorDescriptionEncodingNegotiator(scala.collection.immutable.Seq<HttpHeader> requestHeaders) 
- 
Method SummaryModifier and TypeMethodDescriptionscala.collection.immutable.List<HttpEncodingRange>The encoding-ranges accepted by the client according to given request headers, sorted by 1. increasing generality (i.e. most specific first) 2. decreasing q-value (only for ranges targeting a single HttpEncoding) 3. order of appearance in theAccept-Encodingheader(s)static EncodingNegotiatorapply(scala.collection.immutable.Seq<HttpHeader> requestHeaders) booleanhasMatchingFor(HttpEncoding encoding) Determines whether the request has anAccept-Encodingclause matching the given encoding.booleanisAccepted(HttpEncoding encoding) Determines whether the given encoding is accepted by the client.scala.Option<HttpEncoding>pickEncoding(scala.collection.immutable.List<HttpEncoding> alternatives) Picks the best of the given encoding alternatives given the preferences the client indicated in the request'sAccept-Encodingheaders.floatqValueFor(HttpEncoding encoding) Returns the q-value that the client (implicitly or explicitly) attaches to the given encoding.
- 
Constructor Details- 
EncodingNegotiator
 
- 
- 
Method Details- 
apply
- 
acceptedEncodingRangesThe encoding-ranges accepted by the client according to given request headers, sorted by 1. increasing generality (i.e. most specific first) 2. decreasing q-value (only for ranges targeting a single HttpEncoding) 3. order of appearance in theAccept-Encodingheader(s)- Returns:
- (undocumented)
 
- 
qValueForReturns the q-value that the client (implicitly or explicitly) attaches to the given encoding. See http://tools.ietf.org/html/rfc7231#section-5.3.1 for details.- Parameters:
- encoding- (undocumented)
- Returns:
- (undocumented)
 
- 
isAcceptedDetermines whether the given encoding is accepted by the client.- Parameters:
- encoding- (undocumented)
- Returns:
- (undocumented)
 
- 
hasMatchingForDetermines whether the request has anAccept-Encodingclause matching the given encoding.- Parameters:
- encoding- (undocumented)
- Returns:
- (undocumented)
 
- 
pickEncodingpublic scala.Option<HttpEncoding> pickEncoding(scala.collection.immutable.List<HttpEncoding> alternatives) Picks the best of the given encoding alternatives given the preferences the client indicated in the request'sAccept-Encodingheaders. See http://tools.ietf.org/html/rfc7231#section-5.3.4 for details on the negotiation logic.If there are several best encoding alternatives that the client has equal preference for the order of the given alternatives is used as a tie breaker (first one wins). If none of the given alternatives is acceptable to the client the methods return None.- Parameters:
- alternatives- (undocumented)
- Returns:
- (undocumented)
 
 
-