Class NettyConnectionFactoryTransport

    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected org.slf4j.Logger logger
      Logger for this class.
    • Constructor Summary

      Constructors 
      Constructor Description
      NettyConnectionFactoryTransport​(java.lang.Class<? extends io.netty.channel.Channel> type, io.netty.channel.EventLoopGroup ioGroup)
      Creates a new netty connection factory transport.
      NettyConnectionFactoryTransport​(java.lang.Class<? extends io.netty.channel.Channel> type, io.netty.channel.EventLoopGroup ioGroup, io.netty.channel.EventLoopGroup messageGroup)
      Creates a new netty connection factory transport.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void close()
      Free any resources associated with this transport.
      Connection create​(ConnectionConfig cc)
      Create a connection object.
      void setShutdownOnClose​(boolean b)
      Sets whether to shutdown the event loop groups on close.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • logger

        protected final org.slf4j.Logger logger
        Logger for this class.
    • Constructor Detail

      • NettyConnectionFactoryTransport

        public NettyConnectionFactoryTransport​(java.lang.Class<? extends io.netty.channel.Channel> type,
                                               io.netty.channel.EventLoopGroup ioGroup)
        Creates a new netty connection factory transport.
        Parameters:
        type - of channel
        ioGroup - event loop group to handle I/O
      • NettyConnectionFactoryTransport

        public NettyConnectionFactoryTransport​(java.lang.Class<? extends io.netty.channel.Channel> type,
                                               io.netty.channel.EventLoopGroup ioGroup,
                                               io.netty.channel.EventLoopGroup messageGroup)
        Creates a new netty connection factory transport.
        Parameters:
        type - of channel
        ioGroup - event loop group to handle I/O
        messageGroup - event loop group to handle inbound messages, can be null
    • Method Detail

      • setShutdownOnClose

        public void setShutdownOnClose​(boolean b)
        Sets whether to shutdown the event loop groups on close.
        Parameters:
        b - whether to shutdown on close
      • create

        public Connection create​(ConnectionConfig cc)
        Description copied from interface: Transport
        Create a connection object. Implementations should not open a TCP socket in this method.
        Specified by:
        create in interface Transport
        Parameters:
        cc - connection configuration
        Returns:
        connection
      • close

        public void close()
        Description copied from interface: Transport
        Free any resources associated with this transport.
        Specified by:
        close in interface Transport
      • toString

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