Class Marshaller<A,B> 
java.lang.Object
org.apache.pekko.http.scaladsl.marshalling.Marshaller<A,B> 
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionabstract scala.concurrent.Future<scala.collection.immutable.List<Marshalling<B>>>static Marshaller<byte[],RequestEntity> byteArrayMarshaller(ContentType contentType) static Marshaller<byte[],RequestEntity> static Marshaller<org.apache.pekko.util.ByteString,RequestEntity> byteStringMarshaller(ContentType contentType) static Marshaller<org.apache.pekko.util.ByteString,RequestEntity> static Marshaller<char[],RequestEntity> charArrayMarshaller(MediaType.WithFixedCharset mediaType) static Marshaller<char[],RequestEntity> charArrayMarshaller(MediaType.WithOpenCharset mediaType) static Marshaller<char[],RequestEntity> static <A,B, C> Marshaller<A, C> combined(scala.Function1<A, B> marshal, Marshaller<B, C> m2) Helper for creating aMarshallercombined of the providedmarshalfunction and an implicit Marshaller which is able to produce the required final type.<C> Marshaller<C,B> <C> Marshaller<C,B> composeWithEC(scala.Function1<scala.concurrent.ExecutionContext, scala.Function1<C, A>> f) static Marshaller<org.apache.pekko.Done,RequestEntity> static <A1,A2, B> Marshaller<scala.util.Either<A1, A2>, B> eitherMarshaller(Marshaller<A1, B> m1, Marshaller<A2, B> m2) static Marshaller<FormData,RequestEntity> static <T,M> Marshaller<org.apache.pekko.stream.scaladsl.Source<T, M>, HttpResponse> fromEntityStreamingSupportAndByteStringMarshaller(scala.reflect.ClassTag<T> evidence$1, EntityStreamingSupport s, Marshaller<T, org.apache.pekko.util.ByteString> m) static <T,M> Marshaller<org.apache.pekko.stream.scaladsl.Source<T, M>, HttpResponse> fromEntityStreamingSupportAndByteStringSourceMarshaller(EntityStreamingSupport s, Marshaller<T, org.apache.pekko.stream.scaladsl.Source<org.apache.pekko.util.ByteString, ?>> m, scala.reflect.ClassTag<T> evidence$2) static <T,M> Marshaller<org.apache.pekko.stream.scaladsl.Source<T, M>, HttpResponse> fromEntityStreamingSupportAndEntityMarshaller(EntityStreamingSupport s, Marshaller<T, RequestEntity> m, scala.reflect.ClassTag<T> tag) static <T> Marshaller<scala.Tuple4<HttpMethod,Uri, scala.collection.immutable.Seq<HttpHeader>, T>, HttpRequest> static <S,T> Marshaller<scala.Tuple3<HttpMethod, Uri, T>, HttpRequest> static Marshaller<HttpRequest,HttpRequest> static Marshaller<HttpResponse,HttpResponse> static Marshaller<StatusCode,HttpResponse> static Marshaller<scala.Tuple2<StatusCode,scala.collection.immutable.Seq<HttpHeader>>, HttpResponse> static <T> Marshaller<scala.Tuple3<StatusCode,scala.collection.immutable.Seq<HttpHeader>, T>, HttpResponse> static <S,T> Marshaller<scala.Tuple2<S, T>, HttpResponse> fromStatusCodeAndValue(scala.Function1<S, StatusCode> sConv, Marshaller<T, RequestEntity> mt) static <S,T> Marshaller<scala.Tuple3<S, scala.collection.immutable.Seq<HttpHeader>, T>, HttpResponse> fromStatusCodeConvertibleAndHeadersAndT(scala.Function1<S, StatusCode> sConv, Marshaller<T, RequestEntity> mt) static <T> Marshaller<T,HttpResponse> fromToEntityMarshaller(StatusCode status, scala.collection.immutable.Seq<HttpHeader> headers, Marshaller<T, RequestEntity> m) static <T> StatusCodestatic <T> scala.collection.immutable.Seq<HttpHeader>static Marshaller<Uri,HttpRequest> fromUri()static <A,B> Marshaller<scala.concurrent.Future<A>, B> futureMarshaller(Marshaller<A, B> m) static <T> Marshaller<T,HttpResponse> static <T> Marshaller<T,HttpResponse> <C> Marshaller<A,C> static Marshaller<RequestEntity,RequestEntity> protected static intprotected static Randomstatic <T extends Multipart>
 Marshaller<T,RequestEntity> multipartMarshaller(org.apache.pekko.event.LoggingAdapter log) static <T extends Multipart>
 org.apache.pekko.event.LoggingAdapterstatic <A,B> Marshaller<A, B> oneOf(scala.collection.immutable.Seq<Marshaller<A, B>> marshallers) Helper for creating a "super-marshaller" from a number of "sub-marshallers".static <T,A, B> Marshaller<A, B> oneOf(scala.collection.immutable.Seq<T> values, scala.Function1<T, Marshaller<A, B>> f) Helper for creating a "super-marshaller" from a number of values and a function producing "sub-marshallers" from these values.static <A,B> Marshaller<A, B> opaque(scala.Function1<A, B> marshal) Helper for creating a synchronousMarshallerto non-negotiable content from the given function.static <A,B> Marshaller<scala.Option<A>, B> optionMarshaller(Marshaller<A, B> m, EmptyValue<B> empty) protected abstract static voidorg$apache$pekko$http$scaladsl$marshalling$PredefinedToEntityMarshallers$_setter_$ByteArrayMarshaller_$eq(Marshaller<byte[], RequestEntity> x$1) protected abstract static voidorg$apache$pekko$http$scaladsl$marshalling$PredefinedToEntityMarshallers$_setter_$ByteStringMarshaller_$eq(Marshaller<org.apache.pekko.util.ByteString, RequestEntity> x$1) protected abstract static voidorg$apache$pekko$http$scaladsl$marshalling$PredefinedToEntityMarshallers$_setter_$CharArrayMarshaller_$eq(Marshaller<char[], RequestEntity> x$1) protected abstract static voidorg$apache$pekko$http$scaladsl$marshalling$PredefinedToEntityMarshallers$_setter_$DoneMarshaller_$eq(Marshaller<org.apache.pekko.Done, RequestEntity> x$1) protected abstract static voidorg$apache$pekko$http$scaladsl$marshalling$PredefinedToEntityMarshallers$_setter_$FormDataMarshaller_$eq(Marshaller<FormData, RequestEntity> x$1) protected abstract static voidorg$apache$pekko$http$scaladsl$marshalling$PredefinedToEntityMarshallers$_setter_$MessageEntityMarshaller_$eq(Marshaller<RequestEntity, RequestEntity> x$1) protected abstract static voidorg$apache$pekko$http$scaladsl$marshalling$PredefinedToEntityMarshallers$_setter_$StringMarshaller_$eq(Marshaller<String, RequestEntity> x$1) protected abstract static voidorg$apache$pekko$http$scaladsl$marshalling$PredefinedToRequestMarshallers$_setter_$fromRequest_$eq(Marshaller<HttpRequest, HttpRequest> x$1) protected abstract static voidorg$apache$pekko$http$scaladsl$marshalling$PredefinedToResponseMarshallers$_setter_$fromResponse_$eq(Marshaller<HttpResponse, HttpResponse> x$1) protected abstract static voidorg$apache$pekko$http$scaladsl$marshalling$PredefinedToResponseMarshallers$_setter_$fromStatusCode_$eq(Marshaller<StatusCode, HttpResponse> x$1) protected abstract static voidorg$apache$pekko$http$scaladsl$marshalling$PredefinedToResponseMarshallers$_setter_$fromStatusCodeAndHeaders_$eq(Marshaller<scala.Tuple2<StatusCode, scala.collection.immutable.Seq<HttpHeader>>, HttpResponse> x$1) protected static Stringstatic <A,B> Marshaller<A, B> strict(scala.Function1<A, Marshalling<B>> f) Helper for creating aMarshallerusing the given function.static Marshaller<String,RequestEntity> stringMarshaller(MediaType.WithFixedCharset mediaType) static Marshaller<String,RequestEntity> stringMarshaller(MediaType.WithOpenCharset mediaType) static Marshaller<String,RequestEntity> static <T> Marshaller<Throwable,T> static <A,B> Marshaller<scala.util.Try<A>, B> tryMarshaller(Marshaller<A, B> m) static <A,B> Marshaller<A, B> withFixedContentType(ContentType contentType, scala.Function1<A, B> marshal) Helper for creating a synchronousMarshallerto content with a fixed charset from the given function.static <A,B> Marshaller<A, B> withOpenCharset(MediaType.WithOpenCharset mediaType, scala.Function2<A, HttpCharset, B> marshal) Helper for creating a synchronousMarshallerto content with a negotiable charset from the given function.<C,D> Marshaller<C, D> wrap(MediaType newMediaType, scala.Function1<C, A> f, ContentTypeOverrider<D> mto) Reuses this Marshaller's logic to produce a new Marshaller from another typeCwhich overrides thepekko.http.scaladsl.model.MediaTypeof the marshalling result with the given one.<C,D> Marshaller<C, D> wrapWithEC(MediaType newMediaType, scala.Function1<scala.concurrent.ExecutionContext, scala.Function1<C, A>> f, ContentTypeOverrider<D> cto) Reuses this Marshaller's logic to produce a new Marshaller from another typeCwhich overrides thepekko.http.scaladsl.model.MediaTypeof the marshalling result with the given one.
- 
Constructor Details- 
Marshallerpublic Marshaller()
 
- 
- 
Method Details- 
fromRequest
- 
fromResponse
- 
fromStatusCode
- 
fromStatusCodeAndHeaderspublic static Marshaller<scala.Tuple2<StatusCode,scala.collection.immutable.Seq<HttpHeader>>, fromStatusCodeAndHeaders()HttpResponse> 
- 
ByteArrayMarshaller
- 
ByteStringMarshaller
- 
CharArrayMarshaller
- 
DoneMarshaller
- 
StringMarshaller
- 
FormDataMarshaller
- 
MessageEntityMarshaller
- 
strictHelper for creating aMarshallerusing the given function.- Parameters:
- f- (undocumented)
- Returns:
- (undocumented)
 
- 
oneOfpublic static <A,B> Marshaller<A,B> oneOf(scala.collection.immutable.Seq<Marshaller<A, B>> marshallers) Helper for creating a "super-marshaller" from a number of "sub-marshallers". Content-negotiation determines, which "sub-marshaller" eventually gets to do the job.Please note that all marshallers will actually be invoked in order to get the Marshalling object out of them, and later decide which of the marshallings should be returned. This is by-design, however in ticket as discussed in ticket https://github.com/akka/akka-http/issues/243 it MAY be changed in later versions of Pekko HTTP. - Parameters:
- marshallers- (undocumented)
- Returns:
- (undocumented)
 
- 
oneOfpublic static <T,A, Marshaller<A,B> B> oneOf(scala.collection.immutable.Seq<T> values, scala.Function1<T, Marshaller<A, B>> f) Helper for creating a "super-marshaller" from a number of values and a function producing "sub-marshallers" from these values. Content-negotiation determines, which "sub-marshaller" eventually gets to do the job.Please note that all marshallers will actually be invoked in order to get the Marshalling object out of them, and later decide which of the marshallings should be returned. This is by-design, however in ticket as discussed in ticket https://github.com/akka/akka-http/issues/243 it MAY be changed in later versions of Pekko HTTP. - Parameters:
- values- (undocumented)
- f- (undocumented)
- Returns:
- (undocumented)
 
- 
withFixedContentTypepublic static <A,B> Marshaller<A,B> withFixedContentType(ContentType contentType, scala.Function1<A, B> marshal) Helper for creating a synchronousMarshallerto content with a fixed charset from the given function.- Parameters:
- contentType- (undocumented)
- marshal- (undocumented)
- Returns:
- (undocumented)
 
- 
withOpenCharsetpublic static <A,B> Marshaller<A,B> withOpenCharset(MediaType.WithOpenCharset mediaType, scala.Function2<A, HttpCharset, B> marshal) Helper for creating a synchronousMarshallerto content with a negotiable charset from the given function.- Parameters:
- mediaType- (undocumented)
- marshal- (undocumented)
- Returns:
- (undocumented)
 
- 
opaqueHelper for creating a synchronousMarshallerto non-negotiable content from the given function.- Parameters:
- marshal- (undocumented)
- Returns:
- (undocumented)
 
- 
combinedHelper for creating aMarshallercombined of the providedmarshalfunction and an implicit Marshaller which is able to produce the required final type.- Parameters:
- marshal- (undocumented)
- m2- (undocumented)
- Returns:
- (undocumented)
 
- 
liftMarshallerConversionpublic static <T> Marshaller<T,HttpResponse> liftMarshallerConversion(Marshaller<T, RequestEntity> m) 
- 
liftMarshaller
- 
fromEntityStreamingSupportAndEntityMarshallerpublic static <T,M> Marshaller<org.apache.pekko.stream.scaladsl.Source<T,M>, fromEntityStreamingSupportAndEntityMarshallerHttpResponse> (EntityStreamingSupport s, Marshaller<T, RequestEntity> m, scala.reflect.ClassTag<T> tag) 
- 
fromEntityStreamingSupportAndByteStringSourceMarshallerpublic static <T,M> Marshaller<org.apache.pekko.stream.scaladsl.Source<T,M>, fromEntityStreamingSupportAndByteStringSourceMarshallerHttpResponse> (EntityStreamingSupport s, Marshaller<T, org.apache.pekko.stream.scaladsl.Source<org.apache.pekko.util.ByteString, ?>> m, scala.reflect.ClassTag<T> evidence$2) 
- 
throwableMarshaller
- 
optionMarshallerpublic static <A,B> Marshaller<scala.Option<A>,B> optionMarshaller(Marshaller<A, B> m, EmptyValue<B> empty) 
- 
eitherMarshallerpublic static <A1,A2, Marshaller<scala.util.Either<A1,B> A2>, eitherMarshallerB> (Marshaller<A1, B> m1, Marshaller<A2, B> m2) 
- 
futureMarshaller
- 
tryMarshaller
- 
multipartMarshallerpublic static <T extends Multipart> Marshaller<T,RequestEntity> multipartMarshaller(org.apache.pekko.event.LoggingAdapter log) 
- 
multipartMarshaller$default$1public static <T extends Multipart> org.apache.pekko.event.LoggingAdapter multipartMarshaller$default$1()
- 
multipartBoundaryRandom
- 
multipartBoundaryLengthprotected static int multipartBoundaryLength()
- 
randomBoundary
- 
byteArrayMarshaller
- 
byteStringMarshallerpublic static Marshaller<org.apache.pekko.util.ByteString,RequestEntity> byteStringMarshaller(ContentType contentType) 
- 
charArrayMarshallerpublic static Marshaller<char[],RequestEntity> charArrayMarshaller(MediaType.WithOpenCharset mediaType) 
- 
charArrayMarshallerpublic static Marshaller<char[],RequestEntity> charArrayMarshaller(MediaType.WithFixedCharset mediaType) 
- 
stringMarshallerpublic static Marshaller<String,RequestEntity> stringMarshaller(MediaType.WithOpenCharset mediaType) 
- 
stringMarshallerpublic static Marshaller<String,RequestEntity> stringMarshaller(MediaType.WithFixedCharset mediaType) 
- 
org$apache$pekko$http$scaladsl$marshalling$PredefinedToEntityMarshallers$_setter_$ByteArrayMarshaller_$eqprotected abstract static void org$apache$pekko$http$scaladsl$marshalling$PredefinedToEntityMarshallers$_setter_$ByteArrayMarshaller_$eq(Marshaller<byte[], RequestEntity> x$1) 
- 
org$apache$pekko$http$scaladsl$marshalling$PredefinedToEntityMarshallers$_setter_$ByteStringMarshaller_$eqprotected abstract static void org$apache$pekko$http$scaladsl$marshalling$PredefinedToEntityMarshallers$_setter_$ByteStringMarshaller_$eq(Marshaller<org.apache.pekko.util.ByteString, RequestEntity> x$1) 
- 
org$apache$pekko$http$scaladsl$marshalling$PredefinedToEntityMarshallers$_setter_$CharArrayMarshaller_$eqprotected abstract static void org$apache$pekko$http$scaladsl$marshalling$PredefinedToEntityMarshallers$_setter_$CharArrayMarshaller_$eq(Marshaller<char[], RequestEntity> x$1) 
- 
org$apache$pekko$http$scaladsl$marshalling$PredefinedToEntityMarshallers$_setter_$DoneMarshaller_$eqprotected abstract static void org$apache$pekko$http$scaladsl$marshalling$PredefinedToEntityMarshallers$_setter_$DoneMarshaller_$eq(Marshaller<org.apache.pekko.Done, RequestEntity> x$1) 
- 
org$apache$pekko$http$scaladsl$marshalling$PredefinedToEntityMarshallers$_setter_$StringMarshaller_$eqprotected abstract static void org$apache$pekko$http$scaladsl$marshalling$PredefinedToEntityMarshallers$_setter_$StringMarshaller_$eq(Marshaller<String, RequestEntity> x$1) 
- 
org$apache$pekko$http$scaladsl$marshalling$PredefinedToEntityMarshallers$_setter_$FormDataMarshaller_$eqprotected abstract static void org$apache$pekko$http$scaladsl$marshalling$PredefinedToEntityMarshallers$_setter_$FormDataMarshaller_$eq(Marshaller<FormData, RequestEntity> x$1) 
- 
org$apache$pekko$http$scaladsl$marshalling$PredefinedToEntityMarshallers$_setter_$MessageEntityMarshaller_$eqprotected abstract static void org$apache$pekko$http$scaladsl$marshalling$PredefinedToEntityMarshallers$_setter_$MessageEntityMarshaller_$eq(Marshaller<RequestEntity, RequestEntity> x$1) 
- 
fromToEntityMarshallerpublic static <T> Marshaller<T,HttpResponse> fromToEntityMarshaller(StatusCode status, scala.collection.immutable.Seq<HttpHeader> headers, Marshaller<T, RequestEntity> m) 
- 
fromToEntityMarshaller$default$1
- 
fromToEntityMarshaller$default$2
- 
fromStatusCodeAndValuepublic static <S,T> Marshaller<scala.Tuple2<S,T>, fromStatusCodeAndValueHttpResponse> (scala.Function1<S, StatusCode> sConv, Marshaller<T, RequestEntity> mt) 
- 
fromStatusCodeConvertibleAndHeadersAndTpublic static <S,T> Marshaller<scala.Tuple3<S,scala.collection.immutable.Seq<HttpHeader>, fromStatusCodeConvertibleAndHeadersAndTT>, HttpResponse> (scala.Function1<S, StatusCode> sConv, Marshaller<T, RequestEntity> mt) 
- 
fromStatusCodeAndHeadersAndValuepublic static <T> Marshaller<scala.Tuple3<StatusCode,scala.collection.immutable.Seq<HttpHeader>, fromStatusCodeAndHeadersAndValueT>, HttpResponse> (Marshaller<T, RequestEntity> mt) 
- 
fromEntityStreamingSupportAndByteStringMarshallerpublic static <T,M> Marshaller<org.apache.pekko.stream.scaladsl.Source<T,M>, fromEntityStreamingSupportAndByteStringMarshallerHttpResponse> (scala.reflect.ClassTag<T> evidence$1, EntityStreamingSupport s, Marshaller<T, org.apache.pekko.util.ByteString> m) 
- 
org$apache$pekko$http$scaladsl$marshalling$PredefinedToResponseMarshallers$_setter_$fromResponse_$eqprotected abstract static void org$apache$pekko$http$scaladsl$marshalling$PredefinedToResponseMarshallers$_setter_$fromResponse_$eq(Marshaller<HttpResponse, HttpResponse> x$1) 
- 
org$apache$pekko$http$scaladsl$marshalling$PredefinedToResponseMarshallers$_setter_$fromStatusCode_$eqprotected abstract static void org$apache$pekko$http$scaladsl$marshalling$PredefinedToResponseMarshallers$_setter_$fromStatusCode_$eq(Marshaller<StatusCode, HttpResponse> x$1) 
- 
org$apache$pekko$http$scaladsl$marshalling$PredefinedToResponseMarshallers$_setter_$fromStatusCodeAndHeaders_$eqprotected abstract static void org$apache$pekko$http$scaladsl$marshalling$PredefinedToResponseMarshallers$_setter_$fromStatusCodeAndHeaders_$eq(Marshaller<scala.Tuple2<StatusCode, scala.collection.immutable.Seq<HttpHeader>>, HttpResponse> x$1) 
- 
fromUri
- 
fromMethodAndUriAndValuepublic static <S,T> Marshaller<scala.Tuple3<HttpMethod,Uri, fromMethodAndUriAndValueT>, HttpRequest> (Marshaller<T, RequestEntity> mt) 
- 
fromMethodAndUriAndHeadersAndValuepublic static <T> Marshaller<scala.Tuple4<HttpMethod,Uri, fromMethodAndUriAndHeadersAndValuescala.collection.immutable.Seq<HttpHeader>, T>, HttpRequest> (Marshaller<T, RequestEntity> mt) 
- 
org$apache$pekko$http$scaladsl$marshalling$PredefinedToRequestMarshallers$_setter_$fromRequest_$eqprotected abstract static void org$apache$pekko$http$scaladsl$marshalling$PredefinedToRequestMarshallers$_setter_$fromRequest_$eq(Marshaller<HttpRequest, HttpRequest> x$1) 
- 
applypublic abstract scala.concurrent.Future<scala.collection.immutable.List<Marshalling<B>>> apply(A value, scala.concurrent.ExecutionContext ec) 
- 
map
- 
wrappublic <C,D> Marshaller<C,D> wrap(MediaType newMediaType, scala.Function1<C, A> f, ContentTypeOverrider<D> mto) Reuses this Marshaller's logic to produce a new Marshaller from another typeCwhich overrides thepekko.http.scaladsl.model.MediaTypeof the marshalling result with the given one. Note that not all wrappings are legal. f the underlyingpekko.http.scaladsl.model.MediaTypehas constraints with regard to the charsets it allows the newpekko.http.scaladsl.model.MediaTypemust be compatible, since pekko-http will never recode entities. If the wrapping is illegal theFutureproduced by the resulting marshaller will contain aRuntimeException.- Parameters:
- newMediaType- (undocumented)
- f- (undocumented)
- mto- (undocumented)
- Returns:
- (undocumented)
 
- 
wrapWithECpublic <C,D> Marshaller<C,D> wrapWithEC(MediaType newMediaType, scala.Function1<scala.concurrent.ExecutionContext, scala.Function1<C, A>> f, ContentTypeOverrider<D> cto) Reuses this Marshaller's logic to produce a new Marshaller from another typeCwhich overrides thepekko.http.scaladsl.model.MediaTypeof the marshalling result with the given one. Note that not all wrappings are legal. f the underlyingpekko.http.scaladsl.model.MediaTypehas constraints with regard to the charsets it allows the newpekko.http.scaladsl.model.MediaTypemust be compatible, since pekko-http will never recode entities. If the wrapping is illegal theFutureproduced by the resulting marshaller will contain aRuntimeException.- Parameters:
- newMediaType- (undocumented)
- f- (undocumented)
- cto- (undocumented)
- Returns:
- (undocumented)
 
- 
compose
- 
composeWithECpublic <C> Marshaller<C,B> composeWithEC(scala.Function1<scala.concurrent.ExecutionContext, scala.Function1<C, A>> f) 
 
-