Interface HttpMessageBodyIterator<T>

Type Parameters:
T - The type of payload body.
All Superinterfaces:
AutoCloseable, BlockingIterator<T>, CloseableIterator<T>, Iterator<T>

public interface HttpMessageBodyIterator<T> extends BlockingIterator<T>
Iterable of the message-body that also provides access to the trailers.
  • Method Details

    • trailers

      @Nullable HttpHeaders trailers()
      Get the trailers associated with this message body. Will return null until this BlockingIterator has been completely consumed and Iterator.hasNext() returns false. Even after consumption this method may still return null if there are no trailers.
      Returns:
      the trailer associated with this message body. Will return null until this BlockingIterator has been completely consumed and Iterator.hasNext() returns false. Even after consumption this method may still return null if there are no trailers.