Class Netty4TcpChannel

    • Method Detail

      • addListener

        public static void addListener​(io.netty.channel.ChannelFuture channelFuture,
                                       org.elasticsearch.common.concurrent.CompletableContext<java.lang.Void> context)
        Adds a listener that completes the given CompletableContext to the given ChannelFuture.
        Parameters:
        channelFuture - Channel future
        context - Context to complete
      • addPromise

        public static io.netty.channel.ChannelPromise addPromise​(ActionListener<java.lang.Void> listener,
                                                                 io.netty.channel.Channel channel)
        Creates a ChannelPromise for the given Channel and adds a listener that invokes the given ActionListener on its completion.
        Parameters:
        listener - lister to invoke
        channel - channel
        Returns:
        write promise
      • close

        public void close()
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable
        Specified by:
        close in interface CloseableChannel
      • getProfile

        public java.lang.String getProfile()
        Specified by:
        getProfile in interface TcpChannel
      • getLocalAddress

        public java.net.InetSocketAddress getLocalAddress()
        Specified by:
        getLocalAddress in interface TcpChannel
      • getRemoteAddress

        public java.net.InetSocketAddress getRemoteAddress()
        Specified by:
        getRemoteAddress in interface TcpChannel
      • getNettyChannel

        public io.netty.channel.Channel getNettyChannel()
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object