Marshaller

org.apache.pekko.http.javadsl.marshalling.Marshaller
See theMarshaller companion class
object Marshaller

Attributes

Companion
class
Source
Marshaller.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Marshaller.type

Members list

Value members

Concrete methods

def downcast[A, B1, B2 <: B1](m: Marshaller[A, B2]): Marshaller[A, B1]

Safe downcasting of the output type of the marshaller to a superclass.

Safe downcasting of the output type of the marshaller to a superclass.

Marshaller is covariant in B, i.e. if B2 is a subclass of B1, then Marshaller[X,B2] is OK to use where Marshaller[X,B1] is expected.

Attributes

Source
Marshaller.scala
def downcast[A, B1, B2 <: B1](m: Marshaller[A, B2], target: Class[B1]): Marshaller[A, B1]

Safe downcasting of the output type of the marshaller to a superclass.

Safe downcasting of the output type of the marshaller to a superclass.

Marshaller is covariant in B, i.e. if B2 is a subclass of B1, then Marshaller[X,B2] is OK to use where Marshaller[X,B1] is expected.

Attributes

Source
Marshaller.scala

Attributes

Source
Marshaller.scala

Attributes

Source
Marshaller.scala
def fromScala[A, B](scalaMarshaller: Marshaller[A, B]): Marshaller[A, B]

Attributes

Source
Marshaller.scala
def oneOf[A, B](ms: Marshaller[A, B]*): Marshaller[A, B]

Helper for creating a "super-marshaller" from a number of "sub-marshallers". Content-negotiation determines, which "sub-marshaller" eventually gets to do the job.

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 passed in 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.

Attributes

Source
Marshaller.scala
def oneOf[A, B](m1: Marshaller[A, B], m2: Marshaller[A, B]): Marshaller[A, B]

Helper for creating a "super-marshaller" from a number of "sub-marshallers". Content-negotiation determines, which "sub-marshaller" eventually gets to do the job.

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.

Attributes

Source
Marshaller.scala
def oneOf[A, B](m1: Marshaller[A, B], m2: Marshaller[A, B], m3: Marshaller[A, B]): Marshaller[A, B]

Helper for creating a "super-marshaller" from a number of "sub-marshallers". Content-negotiation determines, which "sub-marshaller" eventually gets to do the job.

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.

Attributes

Source
Marshaller.scala
def oneOf[A, B](m1: Marshaller[A, B], m2: Marshaller[A, B], m3: Marshaller[A, B], m4: Marshaller[A, B]): Marshaller[A, B]

Helper for creating a "super-marshaller" from a number of "sub-marshallers". Content-negotiation determines, which "sub-marshaller" eventually gets to do the job.

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.

Attributes

Source
Marshaller.scala
def oneOf[A, B](m1: Marshaller[A, B], m2: Marshaller[A, B], m3: Marshaller[A, B], m4: Marshaller[A, B], m5: Marshaller[A, B]): Marshaller[A, B]

Helper for creating a "super-marshaller" from a number of "sub-marshallers". Content-negotiation determines, which "sub-marshaller" eventually gets to do the job.

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.

Attributes

Source
Marshaller.scala
def opaque[A, B](f: Function[A, B]): Marshaller[A, B]

Helper for creating a synchronous Marshaller to non-negotiable content from the given function.

Helper for creating a synchronous Marshaller to non-negotiable content from the given function.

Attributes

Source
Marshaller.scala

Marshals an Optional[A] to a RequestEntity an empty optional will yield an empty entity.

Marshals an Optional[A] to a RequestEntity an empty optional will yield an empty entity.

Attributes

Source
Marshaller.scala
def toOption[T](opt: Optional[T]): Option[T]

Attributes

Source
Marshaller.scala
def withFixedContentType[A, B](contentType: ContentType, f: Function[A, B]): Marshaller[A, B]

Helper for creating a synchronous Marshaller to content with a fixed charset from the given function.

Helper for creating a synchronous Marshaller to content with a fixed charset from the given function.

Attributes

Source
Marshaller.scala
def withOpenCharset[A, B](mediaType: WithOpenCharset, f: BiFunction[A, HttpCharset, B]): Marshaller[A, B]

Helper for creating a synchronous Marshaller to content with a negotiable charset from the given function.

Helper for creating a synchronous Marshaller to content with a negotiable charset from the given function.

Attributes

Source
Marshaller.scala

Attributes

Source
Marshaller.scala
def wrapEntity[A, C, E <: RequestEntity](f: Function[C, A], m: Marshaller[A, E], mediaType: MediaType): Marshaller[C, RequestEntity]

Attributes

Source
Marshaller.scala

Implicits

Implicits