QuicStreamChannelBootstrap Class — netty Architecture
Architecture documentation for the QuicStreamChannelBootstrap class in QuicStreamChannelBootstrap.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 53e7d431_f3e8_5664_cca2_0ba55d65b493["QuicStreamChannelBootstrap"] baa1308a_3895_b3b8_ef8a_dcc9ee92da2c["QuicStreamChannelBootstrap.java"] 53e7d431_f3e8_5664_cca2_0ba55d65b493 -->|defined in| baa1308a_3895_b3b8_ef8a_dcc9ee92da2c 4f1bcc1f_466d_7bf2_dfb5_ef6558195b41["QuicStreamChannelBootstrap()"] 53e7d431_f3e8_5664_cca2_0ba55d65b493 -->|method| 4f1bcc1f_466d_7bf2_dfb5_ef6558195b41 b64de51e_62e0_a9ac_f00a_3beb34d728c7["create()"] 53e7d431_f3e8_5664_cca2_0ba55d65b493 -->|method| b64de51e_62e0_a9ac_f00a_3beb34d728c7
Relationship Graph
Source Code
codec-classes-quic/src/main/java/io/netty/handler/codec/quic/QuicStreamChannelBootstrap.java lines 36–149
public final class QuicStreamChannelBootstrap {
private static final InternalLogger logger = InternalLoggerFactory.getInstance(QuicStreamChannelBootstrap.class);
private final QuicChannel parent;
private final Map<ChannelOption<?>, Object> options = new LinkedHashMap<>();
private final Map<AttributeKey<?>, Object> attrs = new HashMap<>();
private ChannelHandler handler;
private QuicStreamType type = QuicStreamType.BIDIRECTIONAL;
/**
* Creates a new instance which uses the given {@link QuicChannel} to bootstrap {@link QuicStreamChannel}s.
*
* @param parent the {@link QuicChannel} that is used.
*/
QuicStreamChannelBootstrap(QuicChannel parent) {
this.parent = ObjectUtil.checkNotNull(parent, "parent");
}
/**
* 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}.
* @param value the value of the option.
* @param <T> the type of the value.
* @return this instance.
*/
public <T> QuicStreamChannelBootstrap 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 QuicStreamChannel}. 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> QuicStreamChannelBootstrap 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 QuicStreamChannel} once created.
*
* @param streamHandler the {@link ChannelHandler} that is added to the {@link QuicStreamChannel}s
* {@link io.netty.channel.ChannelPipeline}.
* @return this instance.
*/
public QuicStreamChannelBootstrap handler(ChannelHandler streamHandler) {
this.handler = ObjectUtil.checkNotNull(streamHandler, "streamHandler");
return this;
}
/**
* Set the {@link QuicStreamType} to use for the {@link QuicStreamChannel}, default is
* {@link QuicStreamType#BIDIRECTIONAL}.
*
* @param type the {@link QuicStreamType} of the {@link QuicStreamChannel}.
* @return this instance.
*/
public QuicStreamChannelBootstrap type(QuicStreamType type) {
this.type = ObjectUtil.checkNotNull(type, "type");
return this;
}
/**
* Creates a new {@link QuicStreamChannel} and notifies the {@link Future}.
*
* @return the {@link Future} that is notified once the operation completes.
*/
public Future<QuicStreamChannel> create() {
return create(parent.eventLoop().newPromise());
}
Defined In
Source
Frequently Asked Questions
What is the QuicStreamChannelBootstrap class?
QuicStreamChannelBootstrap is a class in the netty codebase, defined in codec-classes-quic/src/main/java/io/netty/handler/codec/quic/QuicStreamChannelBootstrap.java.
Where is QuicStreamChannelBootstrap defined?
QuicStreamChannelBootstrap is defined in codec-classes-quic/src/main/java/io/netty/handler/codec/quic/QuicStreamChannelBootstrap.java at line 36.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free