Home / Type/ Http2PromisedRequestVerifier Type — netty Architecture

Http2PromisedRequestVerifier Type — netty Architecture

Architecture documentation for the Http2PromisedRequestVerifier type/interface in Http2PromisedRequestVerifier.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  3dbd1943_612f_acd5_3580_f5aa866b2baf["Http2PromisedRequestVerifier"]
  255493a1_6a2f_2be9_2113_3634b4dab47e["Http2PromisedRequestVerifier.java"]
  3dbd1943_612f_acd5_3580_f5aa866b2baf -->|defined in| 255493a1_6a2f_2be9_2113_3634b4dab47e
  style 3dbd1943_612f_acd5_3580_f5aa866b2baf fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

codec-http2/src/main/java/io/netty/handler/codec/http2/Http2PromisedRequestVerifier.java lines 23–72

public interface Http2PromisedRequestVerifier {
    /**
     * Determine if a {@link Http2Headers} are authoritative for a particular {@link ChannelHandlerContext}.
     * @param ctx The context on which the {@code headers} where received on.
     * @param headers The headers to be verified.
     * @return {@code true} if the {@code ctx} is authoritative for the {@code headers}, {@code false} otherwise.
     * @see
     * <a href="https://tools.ietf.org/html/rfc7540#section-10.1">[RFC 7540], Section 10.1</a>.
     */
    boolean isAuthoritative(ChannelHandlerContext ctx, Http2Headers headers);

    /**
     * Determine if a request is cacheable.
     * @param headers The headers for a push request.
     * @return {@code true} if the request associated with {@code headers} is known to be cacheable,
     * {@code false} otherwise.
     * @see <a href="https://tools.ietf.org/html/rfc7231#section-4.2.3">[RFC 7231], Section 4.2.3</a>.
     */
    boolean isCacheable(Http2Headers headers);

    /**
     * Determine if a request is safe.
     * @param headers The headers for a push request.
     * @return {@code true} if the request associated with {@code headers} is known to be safe,
     * {@code false} otherwise.
     * @see <a href="https://tools.ietf.org/html/rfc7231#section-4.2.1">[RFC 7231], Section 4.2.1</a>.
     */
    boolean isSafe(Http2Headers headers);

    /**
     * A default implementation of {@link Http2PromisedRequestVerifier} which always returns positive responses for
     * all verification challenges.
     */
    Http2PromisedRequestVerifier ALWAYS_VERIFY = new Http2PromisedRequestVerifier() {
        @Override
        public boolean isAuthoritative(ChannelHandlerContext ctx, Http2Headers headers) {
            return true;
        }

        @Override
        public boolean isCacheable(Http2Headers headers) {
            return true;
        }

        @Override
        public boolean isSafe(Http2Headers headers) {
            return true;
        }
    };
}

Frequently Asked Questions

What is the Http2PromisedRequestVerifier type?
Http2PromisedRequestVerifier is a type/interface in the netty codebase, defined in codec-http2/src/main/java/io/netty/handler/codec/http2/Http2PromisedRequestVerifier.java.
Where is Http2PromisedRequestVerifier defined?
Http2PromisedRequestVerifier is defined in codec-http2/src/main/java/io/netty/handler/codec/http2/Http2PromisedRequestVerifier.java at line 23.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free