Home / Class/ QuicChannelBootstrap Class — netty Architecture

QuicChannelBootstrap Class — netty Architecture

Architecture documentation for the QuicChannelBootstrap class in QuicChannelBootstrap.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  cbaed2ad_a58f_152d_a181_0f2ad62cadff["QuicChannelBootstrap"]
  1f1860e5_a532_9113_cbbc_e4122fd44635["QuicChannelBootstrap.java"]
  cbaed2ad_a58f_152d_a181_0f2ad62cadff -->|defined in| 1f1860e5_a532_9113_cbbc_e4122fd44635
  5766a7e8_a225_33f5_630d_58f1de7a0d3d["QuicChannelBootstrap()"]
  cbaed2ad_a58f_152d_a181_0f2ad62cadff -->|method| 5766a7e8_a225_33f5_630d_58f1de7a0d3d
  739ba724_56b4_86f7_7534_58335f6c9409["connect()"]
  cbaed2ad_a58f_152d_a181_0f2ad62cadff -->|method| 739ba724_56b4_86f7_7534_58335f6c9409

Relationship Graph

Source Code

codec-classes-quic/src/main/java/io/netty/handler/codec/quic/QuicChannelBootstrap.java lines 40–247

public final class QuicChannelBootstrap {
    private static final InternalLogger logger = InternalLoggerFactory.getInstance(QuicChannelBootstrap.class);

    private final Channel parent;
    // The order in which ChannelOptions are applied is important they may depend on each other for validation
    // purposes.
    private final Map<ChannelOption<?>, Object> options = new LinkedHashMap<>();
    private final Map<AttributeKey<?>, Object> attrs = new HashMap<>();
    private final Map<ChannelOption<?>, Object> streamOptions = new LinkedHashMap<>();
    private final Map<AttributeKey<?>, Object> streamAttrs = new HashMap<>();

    private SocketAddress local;
    private SocketAddress remote;
    private QuicConnectionAddress connectionAddress = QuicConnectionAddress.EPHEMERAL;
    private ChannelHandler handler;
    private ChannelHandler streamHandler;

    /**
     * Creates a new instance which uses the given {@link Channel} to bootstrap the {@link QuicChannel}.
     * This {@link io.netty.channel.ChannelPipeline} of the {@link Channel} needs to have the quic codec in the
     * pipeline.
     *
     * @param parent    the {@link Channel} that is used as the transport layer.
     * @deprecated Use QuicChannel.newBootstrap() instead.
     */
    @Deprecated
    public QuicChannelBootstrap(Channel parent) {
        Quic.ensureAvailability();
        this.parent = ObjectUtil.checkNotNull(parent, "parent");
    }

    /**
     * Allow to specify a {@link ChannelOption} which is used for the {@link QuicChannel} instances once they got
     * created. Use a value of {@code null} to remove a previous set {@link ChannelOption}.
     *
     * @param option    the {@link ChannelOption} to apply to the {@link QuicChannel}.
     * @param value     the value of the option.
     * @param <T>       the type of the value.
     * @return          this instance.
     */
    public <T> QuicChannelBootstrap option(ChannelOption<T> option, @Nullable T value) {
        Quic.updateOptions(options, option, value);
        return this;
    }

    /**
     * Allow to specify an initial attribute of the newly created {@link QuicChannel}.  If the {@code value} is
     * {@code null}, the attribute of the specified {@code key} is removed.
     *
     * @param key       the {@link AttributeKey} to apply to the {@link QuicChannel}.
     * @param value     the value of the attribute.
     * @param <T>       the type of the value.
     * @return          this instance.
     */
    public <T> QuicChannelBootstrap attr(AttributeKey<T> key, @Nullable T value) {
        Quic.updateAttributes(attrs, key, value);
        return this;
    }

    /**
     * Set the {@link ChannelHandler} that is added to the {@link io.netty.channel.ChannelPipeline} of the
     * {@link QuicChannel} once created.
     *
     * @param handler   the {@link ChannelHandler} that is added to the {@link QuicChannel}s
     *                  {@link io.netty.channel.ChannelPipeline}.
     * @return          this instance.
     */
    public QuicChannelBootstrap handler(ChannelHandler handler) {
        this.handler = ObjectUtil.checkNotNull(handler, "handler");
        return this;
    }

    /**
     * Allow to specify a {@link ChannelOption} which is used for the {@link QuicStreamChannel} instances once they got
     * created. Use a value of {@code null} to remove a previous set {@link ChannelOption}.
     *
     * @param option    the {@link ChannelOption} to apply to the {@link QuicStreamChannel}s.
     * @param value     the value of the option.
     * @param <T>       the type of the value.
     * @return          this instance.
     */

Frequently Asked Questions

What is the QuicChannelBootstrap class?
QuicChannelBootstrap is a class in the netty codebase, defined in codec-classes-quic/src/main/java/io/netty/handler/codec/quic/QuicChannelBootstrap.java.
Where is QuicChannelBootstrap defined?
QuicChannelBootstrap is defined in codec-classes-quic/src/main/java/io/netty/handler/codec/quic/QuicChannelBootstrap.java at line 40.

Analyze Your Own Codebase

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

Try Supermodel Free