Class HttpCommunicationsSession

java.lang.Object
org.apache.nifi.remote.AbstractCommunicationsSession
org.apache.nifi.remote.io.http.HttpCommunicationsSession
All Implemented Interfaces:
Closeable, AutoCloseable, CommunicationsSession
Direct Known Subclasses:
HttpServerCommunicationsSession

public class HttpCommunicationsSession extends AbstractCommunicationsSession
  • Field Details

    • timeout

      protected int timeout
    • input

      protected final HttpInput input
    • output

      protected final HttpOutput output
    • checksum

      protected String checksum
    • dataTransferUrl

      private String dataTransferUrl
  • Constructor Details

    • HttpCommunicationsSession

      public HttpCommunicationsSession()
  • Method Details

    • setTimeout

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

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

      public CommunicationsInput getInput()
    • getOutput

      public CommunicationsOutput getOutput()
    • 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.
    • isClosed

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

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

      public String getChecksum()
    • setChecksum

      public void setChecksum(String checksum)
    • setDataTransferUrl

      public void setDataTransferUrl(String dataTransferUrl)
      Parameters:
      dataTransferUrl - Set data transfer url to use as provenance event transit url.
    • createTransitUri

      public String createTransitUri(String communicantUrl, String sourceFlowFileIdentifier)
      Specified by:
      createTransitUri in interface CommunicationsSession
      Overrides:
      createTransitUri in class AbstractCommunicationsSession
      Parameters:
      communicantUrl - Communicant's url that this session is assigned to.
      sourceFlowFileIdentifier - Source Flow-file's uuid.
      Returns:
      A transit uri to be used in a provenance event.