@Test public void getPayloadAndTrailers() { Publisher<Object> bodyAndTrailers = payloadHolder.payloadBodyAndTrailers(); toSource(bodyAndTrailers).subscribe(payloadAndTrailersSubscriber); simulateAndVerifyPayloadRead(payloadAndTrailersSubscriber); simulateAndVerifyTrailerReadIfApplicable(); }
Publisher<Object> payloadBodyAndTrailers() { if (payloadInfo.mayHaveTrailers()) { assert payloadBody != null; return trailersSingle == null ? rawPayload() : rawPayload().concat(trailersSingle); } if (isTransferEncodingChunked(headers)) { return payloadBody == null ? from(headersFactory.newEmptyTrailers()) : rawPayload().concat(succeeded(headersFactory.newEmptyTrailers())); } return emptyOrRawPayload(); }
StreamingHttpPayloadHolder implements PayloadInfo { Publisher<Object> payloadBodyAndTrailers() { if (payloadInfo.mayHaveTrailers()) { assert payloadBody != null; return trailersSingle == null ? rawPayload() : rawPayload().concat(trailersSingle); } if (isTransferEncodingChunked(headers)) { return payloadBody == null ? from(headersFactory.newEmptyTrailers()) : rawPayload().concat(succeeded(headersFactory.newEmptyTrailers())); } return emptyOrRawPayload(); } }
StreamingHttpPayloadHolder implements PayloadInfo { Publisher<Object> payloadBodyAndTrailers() { if (payloadInfo.mayHaveTrailers()) { assert payloadBody != null; return trailersSingle == null ? rawPayload() : rawPayload().concat(trailersSingle); } if (isTransferEncodingChunked(headers)) { return payloadBody == null ? from(headersFactory.newEmptyTrailers()) : rawPayload().concat(succeeded(headersFactory.newEmptyTrailers())); } return emptyOrRawPayload(); } StreamingHttpPayloadHolder(final HttpHeaders headers, final BufferAllocator allocator,
                               @Nullable final Publisher<?> payloadBody, final DefaultPayloadInfo payloadInfo,
                               final HttpHeadersFactory headersFactory, final HttpProtocolVersion version); }
StreamingHttpPayloadHolder implements PayloadInfo { Publisher<Object> payloadBodyAndTrailers() { if (payloadInfo.mayHaveTrailers()) { assert payloadBody != null; return trailersSingle == null ? rawPayload() : rawPayload().concat(trailersSingle); } if (isTransferEncodingChunked(headers)) { return payloadBody == null ? from(headersFactory.newEmptyTrailers()) : rawPayload().concat(succeeded(headersFactory.newEmptyTrailers())); } return emptyOrRawPayload(); } StreamingHttpPayloadHolder(final HttpHeaders headers, final BufferAllocator allocator,
                               @Nullable final Publisher<?> payloadBody, final DefaultPayloadInfo payloadInfo,
                               final HttpHeadersFactory headersFactory, final HttpProtocolVersion version); void payloadBody(final Publisher<Buffer> payloadBody); void payloadBody(final Publisher<T> payloadBody, final HttpSerializer<T> serializer); void transformPayloadBody(Function<Publisher<Buffer>, Publisher<T>> transformer,
                                         HttpSerializer<T> serializer); void transformPayloadBody(UnaryOperator<Publisher<Buffer>> transformer); void transformRawPayloadBody(UnaryOperator<Publisher<?>> transformer); void transform(final TrailersTransformer<T, Buffer> trailersTransformer); void transformRaw(final TrailersTransformer<T, Object> trailersTransformer); @Override boolean isSafeToAggregate(); @Override boolean mayHaveTrailers(); @Override boolean onlyEmitsBuffer(); @Override boolean equals(final Object o); @Override int hashCode(); }
StreamingHttpPayloadHolder implements PayloadInfo { Publisher<Object> payloadBodyAndTrailers() { if (payloadInfo.mayHaveTrailers()) { assert payloadBody != null; return trailersSingle == null ? rawPayload() : rawPayload().concat(trailersSingle); } if (isTransferEncodingChunked(headers)) { return payloadBody == null ? from(headersFactory.newEmptyTrailers()) : rawPayload().concat(succeeded(headersFactory.newEmptyTrailers())); } return emptyOrRawPayload(); } StreamingHttpPayloadHolder(final HttpHeaders headers, final BufferAllocator allocator,
                               @Nullable final Publisher<?> payloadBody, final DefaultPayloadInfo payloadInfo,
                               final HttpHeadersFactory headersFactory, final HttpProtocolVersion version); void payloadBody(final Publisher<Buffer> payloadBody); void payloadBody(final Publisher<T> payloadBody, final HttpSerializer<T> serializer); void transformPayloadBody(Function<Publisher<Buffer>, Publisher<T>> transformer,
                                         HttpSerializer<T> serializer); void transformPayloadBody(UnaryOperator<Publisher<Buffer>> transformer); void transformRawPayloadBody(UnaryOperator<Publisher<?>> transformer); void transform(final TrailersTransformer<T, Buffer> trailersTransformer); void transformRaw(final TrailersTransformer<T, Object> trailersTransformer); @Override boolean isSafeToAggregate(); @Override boolean mayHaveTrailers(); @Override boolean onlyEmitsBuffer(); @Override boolean equals(final Object o); @Override int hashCode();  }