@Test public void getPayloadWithSerializer() { when(headers.get(CONTENT_TYPE)).thenReturn(TEXT_PLAIN_UTF_8); Publisher<String> payload = textDeserializer().deserialize(headers, payloadHolder.payloadBody()); toSource(payload).subscribe(stringPayloadSubscriber); simulateAndVerifyPayloadRead(stringPayloadSubscriber); simulateAndVerifyPayloadComplete(stringPayloadSubscriber); }
Publisher<Buffer> payloadBody() { if (payloadBody == null) { return empty(); } splitTrailersIfRequired(); return payloadInfo.onlyEmitsBuffer() ? bufferPayload() : rawPayload().liftSync(HttpTransportBufferFilterOperator.INSTANCE); }
StreamingHttpPayloadHolder implements PayloadInfo { Publisher<Buffer> payloadBody() { if (payloadBody == null) { return empty(); } splitTrailersIfRequired(); return payloadInfo.onlyEmitsBuffer() ? bufferPayload() : rawPayload().liftSync(HttpTransportBufferFilterOperator.INSTANCE); } }
StreamingHttpPayloadHolder implements PayloadInfo { Publisher<Buffer> payloadBody() { if (payloadBody == null) { return empty(); } splitTrailersIfRequired(); return payloadInfo.onlyEmitsBuffer() ? bufferPayload() : rawPayload().liftSync(HttpTransportBufferFilterOperator.INSTANCE); } StreamingHttpPayloadHolder(final HttpHeaders headers, final BufferAllocator allocator,
                               @Nullable final Publisher<?> payloadBody, final DefaultPayloadInfo payloadInfo,
                               final HttpHeadersFactory headersFactory, final HttpProtocolVersion version); }
StreamingHttpPayloadHolder implements PayloadInfo { Publisher<Buffer> payloadBody() { if (payloadBody == null) { return empty(); } splitTrailersIfRequired(); return payloadInfo.onlyEmitsBuffer() ? bufferPayload() : rawPayload().liftSync(HttpTransportBufferFilterOperator.INSTANCE); } 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<Buffer> payloadBody() { if (payloadBody == null) { return empty(); } splitTrailersIfRequired(); return payloadInfo.onlyEmitsBuffer() ? bufferPayload() : rawPayload().liftSync(HttpTransportBufferFilterOperator.INSTANCE); } 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();  }