R - the requested typejava.util.function.BiFunction<io.helidon.common.reactive.Flow.Publisher<RequestChunk>,java.lang.Class<? super R>,java.util.concurrent.CompletionStage<? extends R>>StringContentReaderpublic static interface ServerRequest.Reader<R> extends java.util.function.BiFunction<io.helidon.common.reactive.Flow.Publisher<RequestChunk>,java.lang.Class<? super R>,java.util.concurrent.CompletionStage<? extends R>>
| Modifier and Type | Method | Description |
|---|---|---|
default java.util.concurrent.CompletionStage<? extends R> |
apply(io.helidon.common.reactive.Flow.Publisher<RequestChunk> publisher) |
Transforms a publisher into a completion stage.
|
java.util.concurrent.CompletionStage<? extends R> |
apply(io.helidon.common.reactive.Flow.Publisher<RequestChunk> publisher,
java.lang.Class<? super R> clazz) |
Transforms a publisher into a completion stage.
|
default <T extends R> |
applyAndCast(io.helidon.common.reactive.Flow.Publisher<RequestChunk> publisher,
java.lang.Class<T> type) |
Transforms a publisher into a completion stage.
|
java.util.concurrent.CompletionStage<? extends R> apply(io.helidon.common.reactive.Flow.Publisher<RequestChunk> publisher, java.lang.Class<? super R> clazz)
ServerRequest.Content.as(Class) method call ends exceptionally.apply in interface java.util.function.BiFunction<io.helidon.common.reactive.Flow.Publisher<RequestChunk>,java.lang.Class<? super R>,java.util.concurrent.CompletionStage<? extends R>>publisher - the publisher to transformclazz - the requested type to be returned as a completion stage. The purpose of
this parameter is to know what the user of this Reader actually requested.default java.util.concurrent.CompletionStage<? extends R> apply(io.helidon.common.reactive.Flow.Publisher<RequestChunk> publisher)
ServerRequest.Content.as(Class) method call ends exceptionally.
The default implementation calls apply(Flow.Publisher, Class) with Object as
the class parameter.
publisher - the publisher to transformdefault <T extends R> java.util.concurrent.CompletionStage<? extends T> applyAndCast(io.helidon.common.reactive.Flow.Publisher<RequestChunk> publisher, java.lang.Class<T> type)
ServerRequest.Content.as(Class) method call ends exceptionally.
The default implementation calls apply(Flow.Publisher, Class) with Object as
the class parameter.
T - the desired type to cast the guarantied R type topublisher - the publisher to transformtype - the desired type to cast the guarantied R type toClassCastException if the R type wasn't possible to cast
to TCopyright © 2018 Oracle Corporation. All rights reserved.