Class ReactiveResponse.Content
java.lang.Object
org.eclipse.jetty.reactive.client.ReactiveResponse.Content
- Enclosing class:
- ReactiveResponse
Collects utility methods to process response content.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic BiFunction<ReactiveResponse,
org.reactivestreams.Publisher<org.eclipse.jetty.io.Content.Chunk>, org.reactivestreams.Publisher<ByteBuffer>> static BiFunction<ReactiveResponse,
org.reactivestreams.Publisher<org.eclipse.jetty.io.Content.Chunk>, org.reactivestreams.Publisher<ByteBuffer>> asByteBuffer
(int maxCapacity) static BiFunction<ReactiveResponse,
org.reactivestreams.Publisher<org.eclipse.jetty.io.Content.Chunk>, org.reactivestreams.Publisher<ReactiveResponse.Result<ByteBuffer>>> static BiFunction<ReactiveResponse,
org.reactivestreams.Publisher<org.eclipse.jetty.io.Content.Chunk>, org.reactivestreams.Publisher<ReactiveResponse.Result<ByteBuffer>>> asByteBufferResult
(int maxCapacity) static <T> BiFunction<ReactiveResponse,
org.reactivestreams.Publisher<org.eclipse.jetty.io.Content.Chunk>, org.reactivestreams.Publisher<ReactiveResponse.Result<T>>> static BiFunction<ReactiveResponse,
org.reactivestreams.Publisher<org.eclipse.jetty.io.Content.Chunk>, org.reactivestreams.Publisher<String>> asString()
static BiFunction<ReactiveResponse,
org.reactivestreams.Publisher<org.eclipse.jetty.io.Content.Chunk>, org.reactivestreams.Publisher<String>> asString
(int maxCapacity) static BiFunction<ReactiveResponse,
org.reactivestreams.Publisher<org.eclipse.jetty.io.Content.Chunk>, org.reactivestreams.Publisher<ReactiveResponse.Result<String>>> static BiFunction<ReactiveResponse,
org.reactivestreams.Publisher<org.eclipse.jetty.io.Content.Chunk>, org.reactivestreams.Publisher<ReactiveResponse.Result<String>>> asStringResult
(int maxCapacity) static BiFunction<ReactiveResponse,
org.reactivestreams.Publisher<org.eclipse.jetty.io.Content.Chunk>, org.reactivestreams.Publisher<ReactiveResponse>> discard()
-
Constructor Details
-
Content
public Content()
-
-
Method Details
-
discard
public static BiFunction<ReactiveResponse,org.reactivestreams.Publisher<org.eclipse.jetty.io.Content.Chunk>, discard()org.reactivestreams.Publisher<ReactiveResponse>> - Returns:
- a response content processing function that discards the content
-
asString
public static BiFunction<ReactiveResponse,org.reactivestreams.Publisher<org.eclipse.jetty.io.Content.Chunk>, asString()org.reactivestreams.Publisher<String>> - Returns:
- a response content processing function that converts the content to a string up to 2097152 bytes.
-
asString
public static BiFunction<ReactiveResponse,org.reactivestreams.Publisher<org.eclipse.jetty.io.Content.Chunk>, asStringorg.reactivestreams.Publisher<String>> (int maxCapacity) - Returns:
- a response content processing function that converts the content to a string up to the specified maximum capacity in bytes.
-
asByteBuffer
public static BiFunction<ReactiveResponse,org.reactivestreams.Publisher<org.eclipse.jetty.io.Content.Chunk>, asByteBuffer()org.reactivestreams.Publisher<ByteBuffer>> - Returns:
- a response content processing function that converts the content to a
ByteBuffer
up to 2097152 bytes.
-
asByteBuffer
public static BiFunction<ReactiveResponse,org.reactivestreams.Publisher<org.eclipse.jetty.io.Content.Chunk>, asByteBufferorg.reactivestreams.Publisher<ByteBuffer>> (int maxCapacity) - Returns:
- a response content processing function that converts the content to a
ByteBuffer
up to the specified maximum capacity in bytes.
-
asDiscardResult
public static <T> BiFunction<ReactiveResponse,org.reactivestreams.Publisher<org.eclipse.jetty.io.Content.Chunk>, asDiscardResult()org.reactivestreams.Publisher<ReactiveResponse.Result<T>>> - Type Parameters:
T
- the type of the content- Returns:
- a response content processing function that discards the content
and produces a
ReactiveResponse.Result
with anull
content of the given type.
-
asStringResult
public static BiFunction<ReactiveResponse,org.reactivestreams.Publisher<org.eclipse.jetty.io.Content.Chunk>, asStringResult()org.reactivestreams.Publisher<ReactiveResponse.Result<String>>> - Returns:
- a response content processing function that converts the content to a string
up to 2097152 bytes,
and produces a
ReactiveResponse.Result
with the string content.
-
asStringResult
public static BiFunction<ReactiveResponse,org.reactivestreams.Publisher<org.eclipse.jetty.io.Content.Chunk>, asStringResultorg.reactivestreams.Publisher<ReactiveResponse.Result<String>>> (int maxCapacity) - Returns:
- a response content processing function that converts the content to a string
up to the specified maximum capacity in bytes,
and produces a
ReactiveResponse.Result
with the string content.
-
asByteBufferResult
public static BiFunction<ReactiveResponse,org.reactivestreams.Publisher<org.eclipse.jetty.io.Content.Chunk>, asByteBufferResult()org.reactivestreams.Publisher<ReactiveResponse.Result<ByteBuffer>>> - Returns:
- a response content processing function that converts the content to a
ByteBuffer
up to 2097152 bytes, and produces aReactiveResponse.Result
with theByteBuffer
content.
-
asByteBufferResult
public static BiFunction<ReactiveResponse,org.reactivestreams.Publisher<org.eclipse.jetty.io.Content.Chunk>, asByteBufferResultorg.reactivestreams.Publisher<ReactiveResponse.Result<ByteBuffer>>> (int maxCapacity) - Returns:
- a response content processing function that converts the content to a
ByteBuffer
up to the specified maximum capacity in bytes, and produces aReactiveResponse.Result
with theByteBuffer
content.
-