@UnstableApi public class Http2StreamChannelBootstrap extends Object
Channel.
The bootstrap requires a registered parent Channel with a ChannelPipeline that contains the
Http2MultiplexCodec.
A child channel becomes active as soon as it is registered to an eventloop. Therefore, an active channel does not
map to an active HTTP/2 stream immediately. Only once a Http2HeadersFrame has been sent or received, does
the channel map to an active HTTP/2 stream. In case it was not possible to open a new HTTP/2 stream (i.e. due to
the maximum number of active streams being exceeded), the child channel receives an exception indicating the reason
and is closed immediately thereafter.
This class is thread-safe.
| Constructor and Description |
|---|
Http2StreamChannelBootstrap() |
| Modifier and Type | Method and Description |
|---|---|
<T> Http2StreamChannelBootstrap |
attr(io.netty.util.AttributeKey<T> key,
T value)
Specify attributes with an initial value to be set on newly created channels.
|
Map<io.netty.util.AttributeKey<?>,Object> |
attributes() |
io.netty.channel.ChannelFuture |
connect()
Creates a new channel that will eventually map to a local/outbound HTTP/2 stream.
|
io.netty.channel.EventLoopGroup |
group() |
Http2StreamChannelBootstrap |
group(io.netty.channel.EventLoopGroup group)
Sets the
EventLoop to which channels created with this bootstrap are registered. |
io.netty.channel.ChannelHandler |
handler() |
Http2StreamChannelBootstrap |
handler(io.netty.channel.ChannelHandler handler)
Sets the channel handler that should be added to the channels's pipeline.
|
<T> Http2StreamChannelBootstrap |
option(io.netty.channel.ChannelOption<T> option,
T value)
Specify
ChannelOptions to be set on newly created channels. |
Map<io.netty.channel.ChannelOption<?>,Object> |
options() |
io.netty.channel.Channel |
parentChannel() |
Http2StreamChannelBootstrap |
parentChannel(io.netty.channel.Channel parent)
Sets the parent channel that must have the
Http2MultiplexCodec in its pipeline. |
public io.netty.channel.ChannelFuture connect()
public Http2StreamChannelBootstrap parentChannel(io.netty.channel.Channel parent)
Http2MultiplexCodec in its pipeline.parent - a registered channel with the Http2MultiplexCodec in its pipeline. This channel will
be the Channel.parent() of all channels created via connect().thispublic Http2StreamChannelBootstrap handler(io.netty.channel.ChannelHandler handler)
handler - the channel handler to add to the channel's pipeline. The handler must be
ChannelHandler.Sharable.thispublic Http2StreamChannelBootstrap group(io.netty.channel.EventLoopGroup group)
EventLoop to which channels created with this bootstrap are registered.group - the eventloop or null if the eventloop of the parent channel should be used.thispublic <T> Http2StreamChannelBootstrap option(io.netty.channel.ChannelOption<T> option, T value)
ChannelOptions to be set on newly created channels. An option can be removed by specifying a
value of null.public <T> Http2StreamChannelBootstrap attr(io.netty.util.AttributeKey<T> key, T value)
null.public io.netty.channel.Channel parentChannel()
public io.netty.channel.ChannelHandler handler()
public io.netty.channel.EventLoopGroup group()
Copyright © 2008–2017 The Netty Project. All rights reserved.