Interface CloseableAvailableByteBody

All Superinterfaces:
AutoCloseable, AvailableByteBody, ByteBody, Closeable, CloseableByteBody
All Known Implementing Classes:
AvailableByteArrayBody, AvailableNettyByteBody

public interface CloseableAvailableByteBody extends AvailableByteBody, CloseableByteBody
Combination of CloseableByteBody and AvailableByteBody. See their documentation for details.
Since:
4.5.0
Author:
Jonas Konrad
  • Method Details

    • allowDiscard

      @Deprecated default @NonNull CloseableAvailableByteBody allowDiscard()
      Deprecated.
      This method is unnecessary for AvailableByteBody, it does nothing.
      Signal that the upstream may discard any remaining body data. Only if all consumers of the body allow discarding will the body be discarded, otherwise it will still be sent to all consumers. It is an optional operation.

      Discarding may be implemented e.g. by closing the input side of an HTTP/2 stream.

      This method must be called before any primary operation.

      Specified by:
      allowDiscard in interface AvailableByteBody
      Specified by:
      allowDiscard in interface ByteBody
      Specified by:
      allowDiscard in interface CloseableByteBody
      Returns:
      This body