Package akka.http.scaladsl.marshalling
Class Marshal<A>
- java.lang.Object
-
- akka.http.scaladsl.marshalling.Marshal<A>
-
public class Marshal<A> extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Marshal.UnacceptableResponseContentTypeException
static class
Marshal.UnacceptableResponseContentTypeException$
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method 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)
Marshalsvalue
to anHttpResponse
for the givenHttpRequest
with full content-negotiation.A
value()
-
-
-
Constructor Detail
-
Marshal
public Marshal(A value)
-
-
Method Detail
-
apply
public static <T> Marshal<T> apply(T value)
-
selectMarshallingForContentType
public static <T> scala.Option<scala.Function0<T>> selectMarshallingForContentType(scala.collection.immutable.Seq<Marshalling<T>> marshallings, ContentType contentType)
-
value
public A value()
-
to
public <B> scala.concurrent.Future<B> to(Marshaller<A,B> m, scala.concurrent.ExecutionContext ec)
Marshalsvalue
using the first availableMarshalling
forA
andB
provided by the givenMarshaller
. If the marshalling is flexible with regard to the used charsetUTF-8
is chosen.- Parameters:
m
- (undocumented)ec
- (undocumented)- Returns:
- (undocumented)
-
toResponseFor
public scala.concurrent.Future<HttpResponse> toResponseFor(HttpRequest request, Marshaller<A,HttpResponse> m, scala.concurrent.ExecutionContext ec)
Marshalsvalue
to anHttpResponse
for the givenHttpRequest
with full content-negotiation.- Parameters:
request
- (undocumented)m
- (undocumented)ec
- (undocumented)- Returns:
- (undocumented)
-
-