Package akka.http.scaladsl.unmarshalling
Class Unmarshaller.EnhancedFromEntityUnmarshaller<A>
- java.lang.Object
-
- scala.AnyVal
-
- akka.http.scaladsl.unmarshalling.Unmarshaller.EnhancedFromEntityUnmarshaller<A>
-
- Enclosing interface:
- Unmarshaller<A,B>
public static class Unmarshaller.EnhancedFromEntityUnmarshaller<A> extends scala.AnyVal
-
-
Constructor Summary
Constructors Constructor Description EnhancedFromEntityUnmarshaller(Unmarshaller<HttpEntity,A> underlying)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Unmarshaller<HttpEntity,A>
forContentTypes(scala.collection.immutable.Seq<ContentTypeRange> ranges)
Modifies the underlyingUnmarshaller
to only accept Content-Types matching one of the given ranges.<B> Unmarshaller<HttpEntity,B>
mapWithCharset(scala.Function2<A,HttpCharset,B> f)
Unmarshaller<HttpEntity,A>
underlying()
-
-
-
Constructor Detail
-
EnhancedFromEntityUnmarshaller
public EnhancedFromEntityUnmarshaller(Unmarshaller<HttpEntity,A> underlying)
-
-
Method Detail
-
underlying
public Unmarshaller<HttpEntity,A> underlying()
-
mapWithCharset
public <B> Unmarshaller<HttpEntity,B> mapWithCharset(scala.Function2<A,HttpCharset,B> f)
-
forContentTypes
public Unmarshaller<HttpEntity,A> forContentTypes(scala.collection.immutable.Seq<ContentTypeRange> ranges)
Modifies the underlyingUnmarshaller
to only accept Content-Types matching one of the given ranges. Note that you can only restrict to a subset of the Content-Types accepted by the underlying unmarshaller, i.e. the given ranges must be completely supported also by the underlying Unmarshaller! If a violation of this rule is detected at runtime, i.e. if an entity is encountered whose Content-Type is matched by one of the given ranges but rejected by the underlying unmarshaller an IllegalStateException will be thrown!- Parameters:
ranges
- (undocumented)- Returns:
- (undocumented)
-
-