Class SocketCommunicationsSession

java.lang.Object
org.apache.nifi.remote.AbstractCommunicationsSession
org.apache.nifi.remote.io.socket.SocketCommunicationsSession
All Implemented Interfaces:
Closeable, AutoCloseable, CommunicationsSession

public class SocketCommunicationsSession extends AbstractCommunicationsSession
  • Field Details

    • socket

      private final Socket socket
    • request

      private final SocketInput request
    • response

      private final SocketOutput response
    • timeout

      private int timeout
  • Constructor Details

  • Method Details

    • isClosed

      public boolean isClosed()
      Returns:
      true if the connection is closed, false otherwise
    • getInput

      public CommunicationsInput getInput()
    • getOutput

      public CommunicationsOutput getOutput()
    • setTimeout

      public void setTimeout(int millis) throws IOException
      Throws:
      IOException
    • getTimeout

      public int getTimeout() throws IOException
      Throws:
      IOException
    • close

      public void close() throws IOException
      Throws:
      IOException
    • isDataAvailable

      public boolean isDataAvailable()
    • getBytesWritten

      public long getBytesWritten()
    • getBytesRead

      public long getBytesRead()
    • interrupt

      public void interrupt()
      Description copied from interface: CommunicationsSession
      Asynchronously interrupts this FlowFileCodec. Implementations must ensure that they stop sending and receiving data as soon as possible after this method has been called, even if doing so results in sending only partial data to the peer. This will usually result in the peer throwing a SocketTimeoutException.