Class Marshal<A>

java.lang.Object
akka.http.scaladsl.marshalling.Marshal<A>

public class Marshal<A> extends Object
  • Constructor Details

    • Marshal

      public Marshal(A value)
  • Method Details

    • 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)
      Marshals 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.
      Parameters:
      m - (undocumented)
      ec - (undocumented)
      Returns:
      (undocumented)
    • toResponseFor

      public 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.
      Parameters:
      request - (undocumented)
      m - (undocumented)
      ec - (undocumented)
      Returns:
      (undocumented)