Class NettyTransportServer

  • All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable, TransportServer

    public class NettyTransportServer
    extends java.lang.Object
    implements TransportServer, java.io.Closeable
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.net.InetSocketAddress bindAddress()
      Get the bind InetSocketAddress
      boolean bound()
      To check whether the server is bound to use.
      void close()  
      TransportConf conf()  
      java.lang.String ip()
      Get the bind IP
      int listen​(org.apache.hugegraph.computer.core.config.Config config, MessageHandler serverHandler)
      Startup server, return the port listened.
      int port()
      Get the bind port
      void shutdown()
      Stop the server.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • NettyTransportServer

        public NettyTransportServer()
      • NettyTransportServer

        public NettyTransportServer​(io.netty.buffer.ByteBufAllocator bufAllocator)
    • Method Detail

      • listen

        public int listen​(org.apache.hugegraph.computer.core.config.Config config,
                          MessageHandler serverHandler)
        Description copied from interface: TransportServer
        Startup server, return the port listened.
        Specified by:
        listen in interface TransportServer
      • bound

        public boolean bound()
        Description copied from interface: TransportServer
        To check whether the server is bound to use.
        Specified by:
        bound in interface TransportServer
        Returns:
        true if server is bound.
      • close

        public void close()
                   throws java.io.IOException
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable
        Throws:
        java.io.IOException