Package org.elasticsearch.transport.nio
Class NioTcpChannel
java.lang.Object
org.elasticsearch.nio.NioChannel
org.elasticsearch.nio.NioSocketChannel
org.elasticsearch.transport.nio.NioTcpChannel
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable,CloseableChannel,TcpChannel
public class NioTcpChannel extends NioSocketChannel implements TcpChannel
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.elasticsearch.transport.TcpChannel
TcpChannel.ChannelStats -
Constructor Summary
Constructors Constructor Description NioTcpChannel(boolean isServer, java.lang.String profile, java.nio.channels.SocketChannel socketChannel) -
Method Summary
Modifier and Type Method Description voidaddCloseListener(ActionListener<java.lang.Void> listener)voidaddConnectListener(ActionListener<java.lang.Void> listener)voidclose()TcpChannel.ChannelStatsgetChannelStats()java.lang.StringgetProfile()booleanisServerChannel()voidsendMessage(BytesReference reference, ActionListener<java.lang.Void> listener)java.lang.StringtoString()Methods inherited from class org.elasticsearch.nio.NioSocketChannel
addConnectListener, getContext, getLocalAddress, getRawChannel, getRemoteAddress, setContextMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.elasticsearch.transport.TcpChannel
getLocalAddress, getRemoteAddress
-
Constructor Details
-
NioTcpChannel
public NioTcpChannel(boolean isServer, java.lang.String profile, java.nio.channels.SocketChannel socketChannel)
-
-
Method Details
-
sendMessage
- Specified by:
sendMessagein interfaceTcpChannel
-
isServerChannel
public boolean isServerChannel()- Specified by:
isServerChannelin interfaceTcpChannel
-
getProfile
public java.lang.String getProfile()- Specified by:
getProfilein interfaceTcpChannel
-
addCloseListener
- Specified by:
addCloseListenerin interfaceCloseableChannel
-
addConnectListener
- Specified by:
addConnectListenerin interfaceTcpChannel
-
getChannelStats
- Specified by:
getChannelStatsin interfaceTcpChannel
-
close
public void close()- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable- Specified by:
closein interfaceCloseableChannel- Overrides:
closein classNioChannel
-
toString
public java.lang.String toString()- Overrides:
toStringin classNioSocketChannel
-