Class QuicChannelBootstrap


  • public final class QuicChannelBootstrap
    extends Object
    Bootstrap that helps to bootstrap QuicChannels and connecting these to remote peers.
    • Constructor Detail

      • QuicChannelBootstrap

        @Deprecated
        public QuicChannelBootstrap​(io.netty.channel.Channel parent)
        Deprecated.
        Use QuicChannel.newBootstrap() instead.
        Creates a new instance which uses the given Channel to bootstrap the QuicChannel. This ChannelPipeline of the Channel needs to have the quic codec in the pipeline.
        Parameters:
        parent - the Channel that is used as the transport layer.
    • Method Detail

      • option

        public <T> QuicChannelBootstrap option​(io.netty.channel.ChannelOption<T> option,
                                               @Nullable
                                               T value)
        Allow to specify a ChannelOption which is used for the QuicChannel instances once they got created. Use a value of null to remove a previous set ChannelOption.
        Type Parameters:
        T - the type of the value.
        Parameters:
        option - the ChannelOption to apply to the QuicChannel.
        value - the value of the option.
        Returns:
        this instance.
      • attr

        public <T> QuicChannelBootstrap attr​(io.netty.util.AttributeKey<T> key,
                                             @Nullable
                                             T value)
        Allow to specify an initial attribute of the newly created QuicChannel. If the value is null, the attribute of the specified key is removed.
        Type Parameters:
        T - the type of the value.
        Parameters:
        key - the AttributeKey to apply to the QuicChannel.
        value - the value of the attribute.
        Returns:
        this instance.
      • handler

        public QuicChannelBootstrap handler​(io.netty.channel.ChannelHandler handler)
        Set the ChannelHandler that is added to the ChannelPipeline of the QuicChannel once created.
        Parameters:
        handler - the ChannelHandler that is added to the QuicChannels ChannelPipeline.
        Returns:
        this instance.
      • streamOption

        public <T> QuicChannelBootstrap streamOption​(io.netty.channel.ChannelOption<T> option,
                                                     @Nullable
                                                     T value)
        Allow to specify a ChannelOption which is used for the QuicStreamChannel instances once they got created. Use a value of null to remove a previous set ChannelOption.
        Type Parameters:
        T - the type of the value.
        Parameters:
        option - the ChannelOption to apply to the QuicStreamChannels.
        value - the value of the option.
        Returns:
        this instance.
      • streamAttr

        public <T> QuicChannelBootstrap streamAttr​(io.netty.util.AttributeKey<T> key,
                                                   @Nullable
                                                   T value)
        Allow to specify an initial attribute of the newly created QuicStreamChannel. If the value is null, the attribute of the specified key is removed.
        Type Parameters:
        T - the type of the value.
        Parameters:
        key - the AttributeKey to apply to the QuicStreamChannels.
        value - the value of the attribute.
        Returns:
        this instance.
      • streamHandler

        public QuicChannelBootstrap streamHandler​(io.netty.channel.ChannelHandler streamHandler)
        Set the ChannelHandler that is added to the ChannelPipeline of the QuicStreamChannel once created.
        Parameters:
        streamHandler - the ChannelHandler that is added to the QuicStreamChannels ChannelPipeline.
        Returns:
        this instance.
      • connect

        public io.netty.util.concurrent.Future<QuicChannel> connect()
        Connects a QuicChannel to the remote peer and notifies the future once done.
        Returns:
        Future which is notified once the operation completes.
      • connect

        public io.netty.util.concurrent.Future<QuicChannel> connect​(io.netty.util.concurrent.Promise<QuicChannel> promise)
        Connects a QuicChannel to the remote peer and notifies the promise once done.
        Parameters:
        promise - the Promise which is notified once the operations completes.
        Returns:
        Future which is notified once the operation completes.