Interface ProducingNHttpEntity

All Superinterfaces:
HttpEntity
All Known Implementing Classes:
NByteArrayEntity, NFileEntity, NHttpEntityWrapper, NStringEntity

@Deprecated public interface ProducingNHttpEntity extends HttpEntity
An HttpEntity that can stream content out into a ContentEncoder.
Since:
4.0
  • Method Details

    • produceContent

      void produceContent(ContentEncoder encoder, IOControl ioControl) throws IOException
      Deprecated.
      Notification that content should be written to the encoder. IOControl instance passed as a parameter to the method can be used to suspend output events if the entity is temporarily unable to produce more content.

      When all content is finished, this MUST call ContentEncoder.complete(). Failure to do so could result in the entity never being written.

      Parameters:
      encoder - content encoder.
      ioControl - I/O control of the underlying connection.
      Throws:
      IOException
    • finish

      void finish() throws IOException
      Deprecated.
      Notification that any resources allocated for writing can be released.
      Throws:
      IOException