Interface MessageWriteTarget

  • All Known Implementing Classes:
    BlockingClient, NioClient

    public interface MessageWriteTarget
    A target to which messages can be written/connection can be closed
    • Method Detail

      • writeBytes

        com.google.common.util.concurrent.ListenableFuture writeBytes​(byte[] message)
                                                               throws java.io.IOException
        Writes the given bytes to the remote server. The returned future will complete when all bytes have been written to the OS network buffer.
        Throws:
        java.io.IOException
      • closeConnection

        void closeConnection()
        Closes the connection to the server, triggering the StreamConnection.connectionClosed() event on the network-handling thread where all callbacks occur.