Class AbstractBindingHandler

    • Constructor Detail

      • AbstractBindingHandler

        public AbstractBindingHandler​(NIOTransport transport)
    • Method Detail

      • getProcessor

        public Processor getProcessor()
        Get the default Processor to process IOEvent, occurring on connection phase.
        Returns:
        the default Processor to process IOEvent, occurring on connection phase.
      • setProcessor

        public void setProcessor​(Processor processor)
        Set the default Processor to process IOEvent, occurring on connection phase.
        Parameters:
        processor - the default Processor to process IOEvent, occurring on connection phase.
      • setProcessorSelector

        public void setProcessorSelector​(ProcessorSelector processorSelector)
        Sets the default ProcessorSelector, which will be used to get Processor to process I/O events, occurring on connection phase.
        Parameters:
        processorSelector - the default ProcessorSelector, which will be used to get Processor to process I/O events, occurring on connection phase.
      • bind

        public Connection<?> bind​(int port)
                           throws IOException
        Binds Transport to the specific port on localhost.
        Specified by:
        bind in interface SocketBinder
        Parameters:
        port - the port to bind to
        Returns:
        bound Connection
        Throws:
        IOException - if unable to bind i.e. if port already bound
      • bind

        public Connection<?> bind​(String host,
                                  int port)
                           throws IOException
        Binds Transport to the specific host and port.
        Specified by:
        bind in interface SocketBinder
        Parameters:
        host - the local host the server will bind to
        port - specific port to bind to
        Returns:
        bound Connection
        Throws:
        IOException - if unable to bind i.e. if port already bound
      • bind

        public Connection<?> bind​(String host,
                                  int port,
                                  int backlog)
                           throws IOException
        Binds Transport to the specific host and port.
        Specified by:
        bind in interface SocketBinder
        Parameters:
        host - the local host the server will bind to
        port - the port to bind to
        backlog - the maximum length of the queue
        Returns:
        bound Connection
        Throws:
        IOException - if unable to bind i.e. if port already bound
      • bind

        public Connection<?> bind​(String host,
                                  PortRange portRange,
                                  boolean randomStartPort,
                                  int backlog)
                           throws IOException
        Description copied from interface: SocketBinder
        Binds Transport to the specific host, and port within a PortRange.
        Specified by:
        bind in interface SocketBinder
        Parameters:
        host - the local host the server will bind to
        portRange - PortRange.
        randomStartPort - if true, a random port in the range will be used as the initial port.
        backlog - the maximum length of the queue
        Returns:
        bound Connection
        Throws:
        IOException - if unable to bind i.e. if port already bound
      • getSystemInheritedChannel

        protected <T> T getSystemInheritedChannel​(Class<?> channelType)
                                           throws IOException
        Throws:
        IOException