public class Marshal<A>
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
Marshal.UnacceptableResponseContentTypeException |
static class |
Marshal.UnacceptableResponseContentTypeException$ |
Modifier and Type | Method and Description |
---|---|
static <T> Marshal<T> |
apply(T value) |
static <T> scala.Option<scala.Function0<T>> |
selectMarshallingForContentType(scala.collection.immutable.Seq<Marshalling<T>> marshallings,
ContentType contentType) |
<B> scala.concurrent.Future<B> |
to(Marshaller<A,B> m,
scala.concurrent.ExecutionContext ec)
|
scala.concurrent.Future<HttpResponse> |
toResponseFor(HttpRequest request,
Marshaller<A,HttpResponse> m,
scala.concurrent.ExecutionContext ec)
Marshals
value to an HttpResponse for the given HttpRequest with full content-negotiation. |
A |
value() |
public Marshal(A value)
public static <T> Marshal<T> apply(T value)
public static <T> scala.Option<scala.Function0<T>> selectMarshallingForContentType(scala.collection.immutable.Seq<Marshalling<T>> marshallings, ContentType contentType)
public A value()
public <B> scala.concurrent.Future<B> to(Marshaller<A,B> m, scala.concurrent.ExecutionContext ec)
value
using the first available Marshalling
for A
and B
provided by the given Marshaller
.
If the marshalling is flexible with regard to the used charset UTF-8
is chosen.m
- (undocumented)ec
- (undocumented)public scala.concurrent.Future<HttpResponse> toResponseFor(HttpRequest request, Marshaller<A,HttpResponse> m, scala.concurrent.ExecutionContext ec)
value
to an HttpResponse
for the given HttpRequest
with full content-negotiation.request
- (undocumented)m
- (undocumented)ec
- (undocumented)