Class NioServerSocketChannel

java.lang.Object
org.elasticsearch.nio.NioChannel
org.elasticsearch.nio.NioServerSocketChannel

public class NioServerSocketChannel
extends NioChannel
  • Constructor Summary

    Constructors
    Constructor Description
    NioServerSocketChannel​(java.nio.channels.ServerSocketChannel serverSocketChannel)  
  • Method Summary

    Modifier and Type Method Description
    void addBindListener​(java.util.function.BiConsumer<java.lang.Void,​java.lang.Exception> listener)  
    ServerChannelContext getContext()  
    java.net.InetSocketAddress getLocalAddress()  
    java.nio.channels.ServerSocketChannel getRawChannel()  
    void setContext​(ServerChannelContext context)
    This method sets the context for a server socket channel.
    java.lang.String toString()  

    Methods inherited from class org.elasticsearch.nio.NioChannel

    addCloseListener, close, isOpen

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • NioServerSocketChannel

      public NioServerSocketChannel​(java.nio.channels.ServerSocketChannel serverSocketChannel)
  • Method Details

    • setContext

      public void setContext​(ServerChannelContext context)
      This method sets the context for a server socket channel. The context is called when a new channel is accepted, an exception occurs, or it is time to close the channel.
      Parameters:
      context - to call
    • addBindListener

      public void addBindListener​(java.util.function.BiConsumer<java.lang.Void,​java.lang.Exception> listener)
    • getLocalAddress

      public java.net.InetSocketAddress getLocalAddress()
      Specified by:
      getLocalAddress in class NioChannel
    • getRawChannel

      public java.nio.channels.ServerSocketChannel getRawChannel()
      Specified by:
      getRawChannel in class NioChannel
    • getContext

      public ServerChannelContext getContext()
      Specified by:
      getContext in class NioChannel
    • toString

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