Class FakeTcpChannel

java.lang.Object
org.elasticsearch.transport.FakeTcpChannel
All Implemented Interfaces:
Closeable, AutoCloseable, org.elasticsearch.common.network.CloseableChannel, org.elasticsearch.transport.TcpChannel

public class FakeTcpChannel extends Object implements org.elasticsearch.transport.TcpChannel
  • Constructor Details

    • FakeTcpChannel

      public FakeTcpChannel()
    • FakeTcpChannel

      public FakeTcpChannel(boolean isServer)
    • FakeTcpChannel

      public FakeTcpChannel(boolean isServer, InetSocketAddress localAddress, InetSocketAddress remoteAddress)
    • FakeTcpChannel

      public FakeTcpChannel(boolean isServer, AtomicReference<org.elasticsearch.common.bytes.BytesReference> messageCaptor)
    • FakeTcpChannel

      public FakeTcpChannel(boolean isServer, String profile, AtomicReference<org.elasticsearch.common.bytes.BytesReference> messageCaptor)
    • FakeTcpChannel

      public FakeTcpChannel(boolean isServer, InetSocketAddress localAddress, InetSocketAddress remoteAddress, String profile, AtomicReference<org.elasticsearch.common.bytes.BytesReference> messageCaptor)
  • Method Details

    • isServerChannel

      public boolean isServerChannel()
      Specified by:
      isServerChannel in interface org.elasticsearch.transport.TcpChannel
    • getProfile

      public String getProfile()
      Specified by:
      getProfile in interface org.elasticsearch.transport.TcpChannel
    • getLocalAddress

      public InetSocketAddress getLocalAddress()
      Specified by:
      getLocalAddress in interface org.elasticsearch.transport.TcpChannel
    • getRemoteAddress

      public InetSocketAddress getRemoteAddress()
      Specified by:
      getRemoteAddress in interface org.elasticsearch.transport.TcpChannel
    • sendMessage

      public void sendMessage(org.elasticsearch.common.bytes.BytesReference reference, org.elasticsearch.action.ActionListener<Void> listener)
      Specified by:
      sendMessage in interface org.elasticsearch.transport.TcpChannel
    • addConnectListener

      public void addConnectListener(org.elasticsearch.action.ActionListener<Void> listener)
      Specified by:
      addConnectListener in interface org.elasticsearch.transport.TcpChannel
    • close

      public void close()
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
      Specified by:
      close in interface org.elasticsearch.common.network.CloseableChannel
    • addCloseListener

      public void addCloseListener(org.elasticsearch.action.ActionListener<Void> listener)
      Specified by:
      addCloseListener in interface org.elasticsearch.common.network.CloseableChannel
    • isOpen

      public boolean isOpen()
      Specified by:
      isOpen in interface org.elasticsearch.common.network.CloseableChannel
    • getChannelStats

      public org.elasticsearch.transport.TcpChannel.ChannelStats getChannelStats()
      Specified by:
      getChannelStats in interface org.elasticsearch.transport.TcpChannel
    • getMessageCaptor

      public AtomicReference<org.elasticsearch.common.bytes.BytesReference> getMessageCaptor()
    • getListenerCaptor

      public AtomicReference<org.elasticsearch.action.ActionListener<Void>> getListenerCaptor()