public class Marshaller$ extends java.lang.Object implements GenericMarshallers, PredefinedToEntityMarshallers, PredefinedToResponseMarshallers, PredefinedToRequestMarshallers
| Modifier and Type | Field and Description |
|---|---|
static Marshaller$ |
MODULE$
Static reference to the singleton instance of this Scala object.
|
| Constructor and Description |
|---|
Marshaller$() |
| Modifier and Type | Method and Description |
|---|---|
<A,B> Marshaller<A,B> |
apply(scala.Function1<scala.concurrent.ExecutionContext,scala.Function1<A,scala.concurrent.Future<scala.collection.immutable.List<Marshalling<B>>>>> f)
Creates a
Marshaller from the given function. |
Marshaller<byte[],RequestEntity> |
ByteArrayMarshaller() |
Marshaller<org.apache.pekko.util.ByteString,RequestEntity> |
ByteStringMarshaller() |
Marshaller<char[],RequestEntity> |
CharArrayMarshaller() |
<A,B,C> Marshaller<A,C> |
combined(scala.Function1<A,B> marshal,
Marshaller<B,C> m2)
Helper for creating a
Marshaller combined of the provided marshal function
and an implicit Marshaller which is able to produce the required final type. |
Marshaller<org.apache.pekko.Done,RequestEntity> |
DoneMarshaller() |
Marshaller<FormData,RequestEntity> |
FormDataMarshaller() |
Marshaller<HttpRequest,HttpRequest> |
fromRequest() |
Marshaller<HttpResponse,HttpResponse> |
fromResponse() |
Marshaller<StatusCode,HttpResponse> |
fromStatusCode()
Creates a response for a status code.
|
Marshaller<scala.Tuple2<StatusCode,scala.collection.immutable.Seq<HttpHeader>>,HttpResponse> |
fromStatusCodeAndHeaders()
Creates a response from status code and headers.
|
Marshaller<RequestEntity,RequestEntity> |
MessageEntityMarshaller() |
<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".
|
<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.
|
<A,B> Marshaller<A,B> |
opaque(scala.Function1<A,B> marshal)
Helper for creating a synchronous
Marshaller to non-negotiable content from the given function. |
<A,B> Marshaller<A,B> |
strict(scala.Function1<A,Marshalling<B>> f)
Helper for creating a
Marshaller using the given function. |
Marshaller<java.lang.String,RequestEntity> |
StringMarshaller() |
<A,B> Marshaller<A,B> |
withFixedContentType(ContentType contentType,
scala.Function1<A,B> marshal)
Helper for creating a synchronous
Marshaller to content with a fixed charset from the given function. |
<A,B> Marshaller<A,B> |
withOpenCharset(MediaType.WithOpenCharset mediaType,
scala.Function2<A,HttpCharset,B> marshal)
Helper for creating a synchronous
Marshaller to content with a negotiable charset from the given function. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waiteitherMarshaller, futureMarshaller, optionMarshaller, throwableMarshaller, tryMarshallerbyteArrayMarshaller, byteStringMarshaller, charArrayMarshaller, charArrayMarshaller, marshalCharArray, stringMarshaller, stringMarshallermultipartBoundaryLength, multipartBoundaryRandom, multipartMarshaller, randomBoundaryfromEntityStreamingSupportAndByteStringMarshaller, fromStatusCodeAndHeadersAndValue, fromStatusCodeAndValue, fromStatusCodeConvertibleAndHeadersAndT, fromToEntityMarshallerfromEntityStreamingSupportAndByteStringSourceMarshaller, fromEntityStreamingSupportAndEntityMarshaller, liftMarshaller, liftMarshallerConversionfromMethodAndUriAndHeadersAndValue, fromMethodAndUriAndValue, fromUripublic static final Marshaller$ MODULE$
public Marshaller<HttpRequest,HttpRequest> fromRequest()
fromRequest in interface PredefinedToRequestMarshallerspublic Marshaller<HttpResponse,HttpResponse> fromResponse()
fromResponse in interface PredefinedToResponseMarshallerspublic Marshaller<StatusCode,HttpResponse> fromStatusCode()
PredefinedToResponseMarshallerstext-plain entity containing the status.defaultMessage or an empty entity
for status codes that don't allow a response.fromStatusCode in interface PredefinedToResponseMarshallerspublic Marshaller<scala.Tuple2<StatusCode,scala.collection.immutable.Seq<HttpHeader>>,HttpResponse> fromStatusCodeAndHeaders()
PredefinedToResponseMarshallerstext-plain entity containing the status.defaultMessage or an empty entity
for status codes that don't allow a response.fromStatusCodeAndHeaders in interface PredefinedToResponseMarshallerspublic Marshaller<byte[],RequestEntity> ByteArrayMarshaller()
ByteArrayMarshaller in interface PredefinedToEntityMarshallerspublic Marshaller<org.apache.pekko.util.ByteString,RequestEntity> ByteStringMarshaller()
ByteStringMarshaller in interface PredefinedToEntityMarshallerspublic Marshaller<char[],RequestEntity> CharArrayMarshaller()
CharArrayMarshaller in interface PredefinedToEntityMarshallerspublic Marshaller<org.apache.pekko.Done,RequestEntity> DoneMarshaller()
DoneMarshaller in interface PredefinedToEntityMarshallerspublic Marshaller<java.lang.String,RequestEntity> StringMarshaller()
StringMarshaller in interface PredefinedToEntityMarshallerspublic Marshaller<FormData,RequestEntity> FormDataMarshaller()
FormDataMarshaller in interface PredefinedToEntityMarshallerspublic Marshaller<RequestEntity,RequestEntity> MessageEntityMarshaller()
MessageEntityMarshaller in interface PredefinedToEntityMarshallerspublic <A,B> Marshaller<A,B> apply(scala.Function1<scala.concurrent.ExecutionContext,scala.Function1<A,scala.concurrent.Future<scala.collection.immutable.List<Marshalling<B>>>>> f)
Marshaller from the given function.f - (undocumented)public <A,B> Marshaller<A,B> strict(scala.Function1<A,Marshalling<B>> f)
Marshaller using the given function.f - (undocumented)public <A,B> Marshaller<A,B> oneOf(scala.collection.immutable.Seq<Marshaller<A,B>> marshallers)
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.
marshallers - (undocumented)public <T,A,B> Marshaller<A,B> oneOf(scala.collection.immutable.Seq<T> values, scala.Function1<T,Marshaller<A,B>> f)
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.
values - (undocumented)f - (undocumented)public <A,B> Marshaller<A,B> withFixedContentType(ContentType contentType, scala.Function1<A,B> marshal)
Marshaller to content with a fixed charset from the given function.contentType - (undocumented)marshal - (undocumented)public <A,B> Marshaller<A,B> withOpenCharset(MediaType.WithOpenCharset mediaType, scala.Function2<A,HttpCharset,B> marshal)
Marshaller to content with a negotiable charset from the given function.mediaType - (undocumented)marshal - (undocumented)public <A,B> Marshaller<A,B> opaque(scala.Function1<A,B> marshal)
Marshaller to non-negotiable content from the given function.marshal - (undocumented)public <A,B,C> Marshaller<A,C> combined(scala.Function1<A,B> marshal, Marshaller<B,C> m2)
Marshaller combined of the provided marshal function
and an implicit Marshaller which is able to produce the required final type.marshal - (undocumented)m2 - (undocumented)