Package io.netty.handler.codec.http2
Interface Http2PromisedRequestVerifier
-
public interface Http2PromisedRequestVerifierProvides an extensibility point for users to define the validity of push requests.- See Also:
- [RFC 7540], Section 8.2.
-
-
Field Summary
Fields Modifier and Type Field Description static Http2PromisedRequestVerifierALWAYS_VERIFYA default implementation ofHttp2PromisedRequestVerifierwhich always returns positive responses for all verification challenges.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanisAuthoritative(ChannelHandlerContext ctx, Http2Headers headers)Determine if aHttp2Headersare authoritative for a particularChannelHandlerContext.booleanisCacheable(Http2Headers headers)Determine if a request is cacheable.booleanisSafe(Http2Headers headers)Determine if a request is safe.
-
-
-
Field Detail
-
ALWAYS_VERIFY
static final Http2PromisedRequestVerifier ALWAYS_VERIFY
A default implementation ofHttp2PromisedRequestVerifierwhich always returns positive responses for all verification challenges.
-
-
Method Detail
-
isAuthoritative
boolean isAuthoritative(ChannelHandlerContext ctx, Http2Headers headers)
Determine if aHttp2Headersare authoritative for a particularChannelHandlerContext.- Parameters:
ctx- The context on which theheaderswhere received on.headers- The headers to be verified.- Returns:
trueif thectxis authoritative for theheaders,falseotherwise.- See Also:
- [RFC 7540], Section 10.1.
-
isCacheable
boolean isCacheable(Http2Headers headers)
Determine if a request is cacheable.- Parameters:
headers- The headers for a push request.- Returns:
trueif the request associated withheadersis known to be cacheable,falseotherwise.- See Also:
- [RFC 7231], Section 4.2.3.
-
isSafe
boolean isSafe(Http2Headers headers)
Determine if a request is safe.- Parameters:
headers- The headers for a push request.- Returns:
trueif the request associated withheadersis known to be safe,falseotherwise.- See Also:
- [RFC 7231], Section 4.2.1.
-
-