Home / File/ Http2FrameWriter.java — netty Source File

Http2FrameWriter.java — netty Source File

Architecture documentation for Http2FrameWriter.java, a java file in the netty codebase.

Entity Profile

Relationship Graph

Source Code

/*
 * Copyright 2014 The Netty Project
 *
 * The Netty Project licenses this file to you under the Apache License, version 2.0 (the
 * "License"); you may not use this file except in compliance with the License. You may obtain a
 * copy of the License at:
 *
 * https://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software distributed under the License
 * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
 * or implied. See the License for the specific language governing permissions and limitations under
 * the License.
 */

package io.netty.handler.codec.http2;

import io.netty.buffer.ByteBuf;
import io.netty.channel.ChannelFuture;
import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.ChannelPromise;

import java.io.Closeable;

/**
 * A writer responsible for marshaling HTTP/2 frames to the channel. All of the write methods in
 * this interface write to the context, but DO NOT FLUSH. To perform a flush, you must separately
 * call {@link ChannelHandlerContext#flush()}.
 */
public interface Http2FrameWriter extends Http2DataWriter, Closeable {
    /**
     * Configuration specific to {@link Http2FrameWriter}
     */
    interface Configuration {
        /**
         * Get the {@link Http2HeadersEncoder.Configuration} for this {@link Http2FrameWriter}
         */
        Http2HeadersEncoder.Configuration headersConfiguration();

        /**
         * Get the {@link Http2FrameSizePolicy} for this {@link Http2FrameWriter}
         */
        Http2FrameSizePolicy frameSizePolicy();
    }

    /**
     * Writes a HEADERS frame to the remote endpoint.
     *
     * @param ctx the context to use for writing.
     * @param streamId the stream for which to send the frame.
     * @param headers the headers to be sent.
     * @param padding additional bytes that should be added to obscure the true content size. Must be between 0 and
     *                256 (inclusive).
     * @param endStream indicates if this is the last frame to be sent for the stream.
     * @param promise the promise for the write.
     * @return the future for the write.
     * <a href="https://tools.ietf.org/html/rfc7540#section-10.5.1">Section 10.5.1</a> states the following:
     * <pre>
     * The header block MUST be processed to ensure a consistent connection state, unless the connection is closed.
     * </pre>
// ... (168 more lines)

Frequently Asked Questions

What does Http2FrameWriter.java do?
Http2FrameWriter.java is a source file in the netty codebase, written in java.
Where is Http2FrameWriter.java in the architecture?
Http2FrameWriter.java is located at codec-http2/src/main/java/io/netty/handler/codec/http2/Http2FrameWriter.java (directory: codec-http2/src/main/java/io/netty/handler/codec/http2).

Analyze Your Own Codebase

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

Try Supermodel Free