object Unmarshaller extends GenericUnmarshallers with PredefinedFromEntityUnmarshallers with PredefinedFromStringUnmarshallers
- Source
- Unmarshaller.scala
- Alphabetic
- By Inheritance
- Unmarshaller
- PredefinedFromStringUnmarshallers
- PredefinedFromEntityUnmarshallers
- MultipartUnmarshallers
- GenericUnmarshallers
- LowerPriorityGenericUnmarshallers
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Type Members
- final case class EitherUnmarshallingException(rightClass: Class[_], right: Throwable, leftClass: Class[_], left: Throwable) extends RuntimeException with Product with Serializable
Order of parameters (
right
first,left
second) is intentional, since that's the order we evaluate them in. - implicit final class EnhancedFromEntityUnmarshaller[A] extends AnyVal
- implicit final class EnhancedUnmarshaller[A, B] extends AnyVal
- final class UnsupportedContentTypeException extends RuntimeException with Product with Serializable
Signals that unmarshalling failed because the entity content-type did not match one of the supported ranges.
Signals that unmarshalling failed because the entity content-type did not match one of the supported ranges. This error cannot be thrown by custom code, you need to use the
forContentTypes
modifier on a base pekko.http.scaladsl.unmarshalling.Unmarshaller instead.
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- implicit def CsvSeq[T](implicit unmarshaller: Unmarshaller[String, T]): Unmarshaller[String, Seq[T]]
- Definition Classes
- PredefinedFromStringUnmarshallers
- val HexByte: Unmarshaller[String, Byte]
- Definition Classes
- PredefinedFromStringUnmarshallers
- val HexInt: Unmarshaller[String, Int]
- Definition Classes
- PredefinedFromStringUnmarshallers
- val HexLong: Unmarshaller[String, Long]
- Definition Classes
- PredefinedFromStringUnmarshallers
- val HexShort: Unmarshaller[String, Short]
- Definition Classes
- PredefinedFromStringUnmarshallers
- implicit def _fromStringUnmarshallerFromByteStringUnmarshaller[T](implicit bsum: FromByteStringUnmarshaller[T]): Unmarshaller[String, T]
- Definition Classes
- PredefinedFromStringUnmarshallers
- def apply[A, B](f: (ExecutionContext) => (A) => Future[B]): Unmarshaller[A, B]
Creates an
Unmarshaller
from the given function. - final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def bestUnmarshallingCharsetFor(entity: HttpEntity): HttpCharset
Returns the best charset for unmarshalling the given entity to a character-based representation.
Returns the best charset for unmarshalling the given entity to a character-based representation. Falls back to UTF-8 if no better alternative can be determined.
- implicit val booleanFromStringUnmarshaller: Unmarshaller[String, Boolean]
- Definition Classes
- PredefinedFromStringUnmarshallers
- implicit def byteArrayUnmarshaller: FromEntityUnmarshaller[Array[Byte]]
- Definition Classes
- PredefinedFromEntityUnmarshallers
- implicit val byteFromStringUnmarshaller: Unmarshaller[String, Byte]
- Definition Classes
- PredefinedFromStringUnmarshallers
- implicit def byteStringUnmarshaller: FromEntityUnmarshaller[ByteString]
- Definition Classes
- PredefinedFromEntityUnmarshallers
- implicit def charArrayUnmarshaller: FromEntityUnmarshaller[Array[Char]]
- Definition Classes
- PredefinedFromEntityUnmarshallers
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- implicit def defaultMultipartByteRangesUnmarshaller(implicit log: LoggingAdapter = NoLogging, parserSettings: ParserSettings = null): FromEntityUnmarshaller[ByteRanges]
- Definition Classes
- MultipartUnmarshallers
- implicit def defaultMultipartGeneralUnmarshaller(implicit log: LoggingAdapter = NoLogging, parserSettings: ParserSettings = null): FromEntityUnmarshaller[General]
- Definition Classes
- MultipartUnmarshallers
- implicit def defaultUrlEncodedFormDataUnmarshaller: FromEntityUnmarshaller[FormData]
- Definition Classes
- PredefinedFromEntityUnmarshallers
- implicit val doubleFromStringUnmarshaller: Unmarshaller[String, Double]
- Definition Classes
- PredefinedFromStringUnmarshallers
- implicit def eitherUnmarshaller[L, R](implicit ua: FromEntityUnmarshaller[L], rightTag: ClassTag[R], ub: FromEntityUnmarshaller[R], leftTag: ClassTag[L]): FromEntityUnmarshaller[Either[L, R]]
Enables using Either to encode the following unmarshalling logic: Attempt unmarshalling the entity as as
R
first (yieldingR
), and if it fails attempt unmarshalling asL
(yieldingLeft
).Enables using Either to encode the following unmarshalling logic: Attempt unmarshalling the entity as as
R
first (yieldingR
), and if it fails attempt unmarshalling asL
(yieldingLeft
).The either unmarshaller only works with strict entities, so make sure to wrap routes that want to use it with
toStrictEntity
. Otherwise, if a non-strict entity is provided, it will fail with anIllegalArgumentException
.Note that the Either's "R" type will be attempted first (as Left is often considered as the "failed case" in Either).
- Definition Classes
- LowerPriorityGenericUnmarshallers
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- def firstOf[A, B](unmarshallers: Unmarshaller[A, B]*): Unmarshaller[A, B]
Helper for creating a "super-unmarshaller" from a sequence of "sub-unmarshallers", which are tried in the given order.
Helper for creating a "super-unmarshaller" from a sequence of "sub-unmarshallers", which are tried in the given order. The first successful unmarshalling of a "sub-unmarshallers" is the one produced by the "super-unmarshaller".
- implicit val floatFromStringUnmarshaller: Unmarshaller[String, Float]
- Definition Classes
- PredefinedFromStringUnmarshallers
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- implicit def identityUnmarshaller[T]: Unmarshaller[T, T]
- implicit val intFromStringUnmarshaller: Unmarshaller[String, Int]
- Definition Classes
- PredefinedFromStringUnmarshallers
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- implicit def liftToSourceOptionUnmarshaller[A, B](um: Unmarshaller[A, B]): Unmarshaller[Option[A], B]
- Definition Classes
- LowerPriorityGenericUnmarshallers
- implicit def liftToTargetOptionUnmarshaller[A, B](um: Unmarshaller[A, B]): Unmarshaller[A, Option[B]]
- Definition Classes
- GenericUnmarshallers
- implicit val longFromStringUnmarshaller: Unmarshaller[String, Long]
- Definition Classes
- PredefinedFromStringUnmarshallers
- implicit def messageUnmarshallerFromEntityUnmarshaller[T](implicit um: FromEntityUnmarshaller[T]): FromMessageUnmarshaller[T]
- Definition Classes
- LowerPriorityGenericUnmarshallers
- def multipartByteRangesUnmarshaller(defaultCharset: HttpCharset)(implicit log: LoggingAdapter = NoLogging, parserSettings: ParserSettings = null): FromEntityUnmarshaller[ByteRanges]
- Definition Classes
- MultipartUnmarshallers
- implicit def multipartFormDataUnmarshaller(implicit log: LoggingAdapter = NoLogging, parserSettings: ParserSettings = null): FromEntityUnmarshaller[FormData]
- Definition Classes
- MultipartUnmarshallers
- def multipartGeneralUnmarshaller(defaultCharset: HttpCharset)(implicit log: LoggingAdapter = NoLogging, parserSettings: ParserSettings = null): FromEntityUnmarshaller[General]
- Definition Classes
- MultipartUnmarshallers
- def multipartUnmarshaller[T <: Multipart, BP <: BodyPart, BPS <: Strict](mediaRange: MediaRange, defaultContentType: ContentType, createBodyPart: (BodyPartEntity, List[HttpHeader]) => BP, createStreamed: (Multipart, Source[BP, Any]) => T, createStrictBodyPart: (Strict, List[HttpHeader]) => BPS, createStrict: (Multipart, Seq[BPS]) => T)(implicit log: LoggingAdapter = NoLogging, parserSettings: ParserSettings = null): FromEntityUnmarshaller[T]
- Definition Classes
- MultipartUnmarshallers
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- implicit val shortFromStringUnmarshaller: Unmarshaller[String, Short]
- Definition Classes
- PredefinedFromStringUnmarshallers
- implicit def sourceOptionUnmarshaller[A, B](implicit um: Unmarshaller[A, B]): Unmarshaller[Option[A], B]
- Definition Classes
- LowerPriorityGenericUnmarshallers
- def strict[A, B](f: (A) => B): Unmarshaller[A, B]
Helper for creating a synchronous
Unmarshaller
from the given function. - implicit def stringUnmarshaller: FromEntityUnmarshaller[String]
- Definition Classes
- PredefinedFromEntityUnmarshallers
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- implicit def targetOptionUnmarshaller[A, B](implicit um: Unmarshaller[A, B]): Unmarshaller[A, Option[B]]
- Definition Classes
- GenericUnmarshallers
- def toString(): String
- Definition Classes
- AnyRef → Any
- def urlEncodedFormDataUnmarshaller(ranges: ContentTypeRange*): FromEntityUnmarshaller[FormData]
- Definition Classes
- PredefinedFromEntityUnmarshallers
- implicit val uuidFromStringUnmarshaller: Unmarshaller[String, UUID]
- Definition Classes
- PredefinedFromStringUnmarshallers
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- def withMaterializer[A, B](f: (ExecutionContext) => (Materializer) => (A) => Future[B]): Unmarshaller[A, B]
- case object NoContentException extends RuntimeException with NoStackTrace with Product with Serializable
Signals that unmarshalling failed because the entity was unexpectedly empty.
- object UnsupportedContentTypeException extends Serializable