Class QuicChannelBootstrap
java.lang.Object
io.netty.handler.codec.quic.QuicChannelBootstrap
Bootstrap that helps to bootstrap
QuicChannels and connecting these to remote peers.-
Constructor Summary
ConstructorsConstructorDescriptionQuicChannelBootstrap(Channel parent) Deprecated.Use QuicChannel.newBootstrap() instead. -
Method Summary
Modifier and TypeMethodDescriptionattr(AttributeKey<T> key, T value) Allow to specify an initial attribute of the newly createdQuicChannel.connect()Connects aQuicChannelto the remote peer and notifies the future once done.connect(Promise<QuicChannel> promise) Connects aQuicChannelto the remote peer and notifies the promise once done.connectionAddress(QuicConnectionAddress connectionAddress) Set theQuicConnectionAddressto use.handler(ChannelHandler handler) localAddress(SocketAddress local) Set the local address.option(ChannelOption<T> option, T value) Allow to specify aChannelOptionwhich is used for theQuicChannelinstances once they got created.remoteAddress(SocketAddress remote) Set the remote address of the host to talk to.streamAttr(AttributeKey<T> key, T value) Allow to specify an initial attribute of the newly createdQuicStreamChannel.streamHandler(ChannelHandler streamHandler) streamOption(ChannelOption<T> option, T value) Allow to specify aChannelOptionwhich is used for theQuicStreamChannelinstances once they got created.
-
Constructor Details
-
QuicChannelBootstrap
Deprecated.Use QuicChannel.newBootstrap() instead.Creates a new instance which uses the givenChannelto bootstrap theQuicChannel. ThisChannelPipelineof theChannelneeds to have the quic codec in the pipeline.- Parameters:
parent- theChannelthat is used as the transport layer.
-
-
Method Details
-
option
Allow to specify aChannelOptionwhich is used for theQuicChannelinstances once they got created. Use a value ofnullto remove a previous setChannelOption.- Type Parameters:
T- the type of the value.- Parameters:
option- theChannelOptionto apply to theQuicChannel.value- the value of the option.- Returns:
- this instance.
-
attr
Allow to specify an initial attribute of the newly createdQuicChannel. If thevalueisnull, the attribute of the specifiedkeyis removed.- Type Parameters:
T- the type of the value.- Parameters:
key- theAttributeKeyto apply to theQuicChannel.value- the value of the attribute.- Returns:
- this instance.
-
handler
- Parameters:
handler- theChannelHandlerthat is added to theQuicChannelsChannelPipeline.- Returns:
- this instance.
-
streamOption
Allow to specify aChannelOptionwhich is used for theQuicStreamChannelinstances once they got created. Use a value ofnullto remove a previous setChannelOption.- Type Parameters:
T- the type of the value.- Parameters:
option- theChannelOptionto apply to theQuicStreamChannels.value- the value of the option.- Returns:
- this instance.
-
streamAttr
Allow to specify an initial attribute of the newly createdQuicStreamChannel. If thevalueisnull, the attribute of the specifiedkeyis removed.- Type Parameters:
T- the type of the value.- Parameters:
key- theAttributeKeyto apply to theQuicStreamChannels.value- the value of the attribute.- Returns:
- this instance.
-
streamHandler
- Parameters:
streamHandler- theChannelHandlerthat is added to theQuicStreamChannelsChannelPipeline.- Returns:
- this instance.
-
localAddress
Set the local address.- Parameters:
local- theSocketAddressof the local peer.- Returns:
- this instance.
-
remoteAddress
Set the remote address of the host to talk to.- Parameters:
remote- theSocketAddressof the remote peer.- Returns:
- this instance.
-
connectionAddress
Set theQuicConnectionAddressto use. If none is specified a random address is generated on your behalf.- Parameters:
connectionAddress- theQuicConnectionAddressto use.- Returns:
- this instance.
-
connect
Connects aQuicChannelto the remote peer and notifies the future once done.- Returns:
Futurewhich is notified once the operation completes.
-
connect
Connects aQuicChannelto the remote peer and notifies the promise once done.
-