Package org.elasticsearch.transport
Class MockTcpTransport.MockChannel
- java.lang.Object
-
- org.elasticsearch.transport.MockTcpTransport.MockChannel
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable,CloseableChannel,TcpChannel,TcpServerChannel
- Enclosing class:
- MockTcpTransport
public final class MockTcpTransport.MockChannel extends java.lang.Object implements java.io.Closeable, TcpChannel, TcpServerChannel
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.elasticsearch.transport.TcpChannel
TcpChannel.ChannelStats
-
-
Method Summary
Modifier and Type Method Description voidaccept(java.util.concurrent.Executor executor)voidaddCloseListener(ActionListener<java.lang.Void> listener)voidaddConnectListener(ActionListener<java.lang.Void> listener)voidclose()TcpChannel.ChannelStatsgetChannelStats()java.net.InetSocketAddressgetLocalAddress()java.lang.StringgetProfile()java.net.InetSocketAddressgetRemoteAddress()booleanisOpen()booleanisServerChannel()voidsendMessage(BytesReference reference, ActionListener<java.lang.Void> listener)java.lang.StringtoString()
-
-
-
Method Detail
-
accept
public void accept(java.util.concurrent.Executor executor) throws java.io.IOException- Throws:
java.io.IOException
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
close
public void close()
- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable- Specified by:
closein interfaceCloseableChannel
-
getProfile
public java.lang.String getProfile()
- Specified by:
getProfilein interfaceTcpChannel- Specified by:
getProfilein interfaceTcpServerChannel
-
isServerChannel
public boolean isServerChannel()
- Specified by:
isServerChannelin interfaceTcpChannel
-
addCloseListener
public void addCloseListener(ActionListener<java.lang.Void> listener)
- Specified by:
addCloseListenerin interfaceCloseableChannel
-
addConnectListener
public void addConnectListener(ActionListener<java.lang.Void> listener)
- Specified by:
addConnectListenerin interfaceTcpChannel
-
getChannelStats
public TcpChannel.ChannelStats getChannelStats()
- Specified by:
getChannelStatsin interfaceTcpChannel
-
isOpen
public boolean isOpen()
- Specified by:
isOpenin interfaceCloseableChannel
-
getLocalAddress
public java.net.InetSocketAddress getLocalAddress()
- Specified by:
getLocalAddressin interfaceTcpChannel- Specified by:
getLocalAddressin interfaceTcpServerChannel
-
getRemoteAddress
public java.net.InetSocketAddress getRemoteAddress()
- Specified by:
getRemoteAddressin interfaceTcpChannel
-
sendMessage
public void sendMessage(BytesReference reference, ActionListener<java.lang.Void> listener)
- Specified by:
sendMessagein interfaceTcpChannel
-
-