Package org.elasticsearch.nio
Class NioSocketChannel
- java.lang.Object
-
- org.elasticsearch.nio.NioChannel
-
- org.elasticsearch.nio.NioSocketChannel
-
public class NioSocketChannel extends NioChannel
-
-
Constructor Summary
Constructors Constructor Description NioSocketChannel(java.nio.channels.SocketChannel socketChannel)
-
Method Summary
Modifier and Type Method Description voidaddConnectListener(java.util.function.BiConsumer<java.lang.Void,java.lang.Exception> listener)SocketChannelContextgetContext()java.net.InetSocketAddressgetLocalAddress()java.nio.channels.SocketChannelgetRawChannel()java.net.InetSocketAddressgetRemoteAddress()voidsetContext(SocketChannelContext context)java.lang.StringtoString()-
Methods inherited from class org.elasticsearch.nio.NioChannel
addCloseListener, close, isOpen
-
-
-
-
Method Detail
-
setContext
public void setContext(SocketChannelContext context)
-
getLocalAddress
public java.net.InetSocketAddress getLocalAddress()
- Specified by:
getLocalAddressin classNioChannel
-
getRawChannel
public java.nio.channels.SocketChannel getRawChannel()
- Specified by:
getRawChannelin classNioChannel
-
getContext
public SocketChannelContext getContext()
- Specified by:
getContextin classNioChannel
-
getRemoteAddress
public java.net.InetSocketAddress getRemoteAddress()
-
addConnectListener
public void addConnectListener(java.util.function.BiConsumer<java.lang.Void,java.lang.Exception> listener)
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-