public abstract class Unmarshaller<A,B> extends java.lang.Object implements UnmarshallerBase<A,B>
Modifier and Type | Class and Description |
---|---|
static class |
Unmarshaller.UnsupportedContentTypeException |
Constructor and Description |
---|
Unmarshaller() |
Modifier and Type | Method and Description |
---|---|
abstract Unmarshaller<A,B> |
asScala() |
<I> Unmarshaller<I,B> |
asScalaCastInput()
INTERNAL API
|
static <A,B> Unmarshaller<A,B> |
async(java.util.function.Function<A,java.util.concurrent.CompletionStage<B>> f)
Creates an unmarshaller from an asynchronous Java function.
|
static Unmarshaller<HttpEntity,byte[]> |
entityToByteArray() |
static Unmarshaller<HttpEntity,org.apache.pekko.util.ByteString> |
entityToByteString() |
static Unmarshaller<HttpEntity,char[]> |
entityToCharArray() |
static Unmarshaller<HttpEntity,Multipart.ByteRanges> |
entityToMultipartByteRangesUnmarshaller() |
static Unmarshaller<HttpEntity,Multipart.FormData> |
entityToMultipartFormData() |
static Unmarshaller<HttpEntity,java.lang.String> |
entityToString() |
static Unmarshaller<HttpEntity,FormData> |
entityToWwwUrlEncodedFormData() |
static <A,B> Unmarshaller<A,B> |
firstOf(Unmarshaller<A,B> u1,
Unmarshaller<A,B> u2) |
static <A,B> Unmarshaller<A,B> |
firstOf(Unmarshaller<A,B> u1,
Unmarshaller<A,B> u2,
Unmarshaller<A,B> u3) |
static <A,B> Unmarshaller<A,B> |
firstOf(Unmarshaller<A,B> u1,
Unmarshaller<A,B> u2,
Unmarshaller<A,B> u3,
Unmarshaller<A,B> u4) |
static <A,B> Unmarshaller<A,B> |
firstOf(Unmarshaller<A,B> u1,
Unmarshaller<A,B> u2,
Unmarshaller<A,B> u3,
Unmarshaller<A,B> u4,
Unmarshaller<A,B> u5) |
<C> Unmarshaller<A,C> |
flatMap(java.util.function.Function<B,java.util.concurrent.CompletionStage<C>> f) |
<C> Unmarshaller<A,C> |
flatMap(Unmarshaller<? super B,C> u) |
static <B> Unmarshaller<HttpEntity,B> |
forMediaType(MediaType t,
Unmarshaller<HttpEntity,B> um) |
static <B> Unmarshaller<HttpEntity,B> |
forMediaTypes(java.lang.Iterable<MediaType> types,
Unmarshaller<HttpEntity,B> um) |
static <A,B> Unmarshaller<A,B> |
fromScala(Unmarshaller<A,B> scalaUnmarshaller) |
static Unmarshaller<HttpRequest,RequestEntity> |
requestToEntity() |
static <A,B> Unmarshaller<A,B> |
sync(java.util.function.Function<A,B> f)
Creates an unmarshaller from a Java function.
|
<C> Unmarshaller<A,C> |
thenApply(java.util.function.Function<B,C> f)
Transform the result
B of this unmarshaller to a C producing a marshaller that turns A s into C s
|
java.util.concurrent.CompletionStage<B> |
unmarshal(A value,
org.apache.pekko.actor.ClassicActorSystemProvider system)
Apply this Unmarshaller to the given value.
|
java.util.concurrent.CompletionStage<B> |
unmarshal(A value,
scala.concurrent.ExecutionContext ec,
org.apache.pekko.actor.ClassicActorSystemProvider system)
Apply this Unmarshaller to the given value.
|
java.util.concurrent.CompletionStage<B> |
unmarshal(A value,
scala.concurrent.ExecutionContext ec,
org.apache.pekko.stream.Materializer mat)
Apply this Unmarshaller to the given value.
|
java.util.concurrent.CompletionStage<B> |
unmarshal(A value,
org.apache.pekko.stream.Materializer mat)
Apply this Unmarshaller to the given value.
|
public static <A,B> Unmarshaller<A,B> fromScala(Unmarshaller<A,B> scalaUnmarshaller)
public static <A,B> Unmarshaller<A,B> async(java.util.function.Function<A,java.util.concurrent.CompletionStage<B>> f)
f
- (undocumented)public static <A,B> Unmarshaller<A,B> sync(java.util.function.Function<A,B> f)
f
- (undocumented)public static Unmarshaller<HttpEntity,org.apache.pekko.util.ByteString> entityToByteString()
public static Unmarshaller<HttpEntity,byte[]> entityToByteArray()
public static Unmarshaller<HttpEntity,char[]> entityToCharArray()
public static Unmarshaller<HttpEntity,java.lang.String> entityToString()
public static Unmarshaller<HttpEntity,FormData> entityToWwwUrlEncodedFormData()
public static Unmarshaller<HttpEntity,Multipart.ByteRanges> entityToMultipartByteRangesUnmarshaller()
public static Unmarshaller<HttpEntity,Multipart.FormData> entityToMultipartFormData()
public static Unmarshaller<HttpRequest,RequestEntity> requestToEntity()
public static <B> Unmarshaller<HttpEntity,B> forMediaType(MediaType t, Unmarshaller<HttpEntity,B> um)
public static <B> Unmarshaller<HttpEntity,B> forMediaTypes(java.lang.Iterable<MediaType> types, Unmarshaller<HttpEntity,B> um)
public static <A,B> Unmarshaller<A,B> firstOf(Unmarshaller<A,B> u1, Unmarshaller<A,B> u2)
public static <A,B> Unmarshaller<A,B> firstOf(Unmarshaller<A,B> u1, Unmarshaller<A,B> u2, Unmarshaller<A,B> u3)
public static <A,B> Unmarshaller<A,B> firstOf(Unmarshaller<A,B> u1, Unmarshaller<A,B> u2, Unmarshaller<A,B> u3, Unmarshaller<A,B> u4)
public static <A,B> Unmarshaller<A,B> firstOf(Unmarshaller<A,B> u1, Unmarshaller<A,B> u2, Unmarshaller<A,B> u3, Unmarshaller<A,B> u4, Unmarshaller<A,B> u5)
public abstract Unmarshaller<A,B> asScala()
public <I> Unmarshaller<I,B> asScalaCastInput()
public java.util.concurrent.CompletionStage<B> unmarshal(A value, scala.concurrent.ExecutionContext ec, org.apache.pekko.stream.Materializer mat)
value
- (undocumented)ec
- (undocumented)mat
- (undocumented)public java.util.concurrent.CompletionStage<B> unmarshal(A value, org.apache.pekko.stream.Materializer mat)
ExecutionContext
.
If you expect the marshalling to be heavy, it is suggested to provide a specialized context for those operations.value
- (undocumented)mat
- (undocumented)public java.util.concurrent.CompletionStage<B> unmarshal(A value, scala.concurrent.ExecutionContext ec, org.apache.pekko.actor.ClassicActorSystemProvider system)
value
- (undocumented)ec
- (undocumented)system
- (undocumented)public java.util.concurrent.CompletionStage<B> unmarshal(A value, org.apache.pekko.actor.ClassicActorSystemProvider system)
ExecutionContext
.
If you expect the marshalling to be heavy, it is suggested to provide a specialized context for those operations.value
- (undocumented)system
- (undocumented)public <C> Unmarshaller<A,C> thenApply(java.util.function.Function<B,C> f)
B
of this unmarshaller to a C
producing a marshaller that turns A
s into C
s
f
- (undocumented)A
into instances of C
public <C> Unmarshaller<A,C> flatMap(java.util.function.Function<B,java.util.concurrent.CompletionStage<C>> f)
public <C> Unmarshaller<A,C> flatMap(Unmarshaller<? super B,C> u)