Package akka.http.scaladsl.common
Class NameUnmarshallerReceptacle<T>
- java.lang.Object
-
- akka.http.scaladsl.common.NameUnmarshallerReceptacle<T>
-
public class NameUnmarshallerReceptacle<T> extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description NameUnmarshallerReceptacle(java.lang.String name, Unmarshaller<java.lang.String,T> um)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <B> NameUnmarshallerReceptacle<B>as(Unmarshaller<T,B> unmarshaller)Extract the value as the specified type.java.lang.Stringname()NameOptionUnmarshallerReceptacle<T>optional()Extract the optional value asOption[T].RepeatedValueUnmarshallerReceptacle<T>repeated()Extract multiple occurrences asIterable[String].RequiredValueUnmarshallerReceptacle<T>requiredValue(T requiredValue)Require the given value and extract nothing.Unmarshaller<java.lang.String,T>um()NameDefaultUnmarshallerReceptacle<T>withDefault(T default_)Extract the optional value asT, if it is missing use the given default value.
-
-
-
Constructor Detail
-
NameUnmarshallerReceptacle
public NameUnmarshallerReceptacle(java.lang.String name, Unmarshaller<java.lang.String,T> um)
-
-
Method Detail
-
as
public <B> NameUnmarshallerReceptacle<B> as(Unmarshaller<T,B> unmarshaller)
Extract the value as the specified type. You need a matchingUnmarshallerin scope for that to work.- Parameters:
unmarshaller- (undocumented)- Returns:
- (undocumented)
-
name
public java.lang.String name()
-
optional
public NameOptionUnmarshallerReceptacle<T> optional()
Extract the optional value asOption[T]. Symbolic alias foroptional().- Returns:
- (undocumented)
-
repeated
public RepeatedValueUnmarshallerReceptacle<T> repeated()
Extract multiple occurrences asIterable[String].- Returns:
- (undocumented)
-
requiredValue
public RequiredValueUnmarshallerReceptacle<T> requiredValue(T requiredValue)
Require the given value and extract nothing. Reject if it is missing or has a different value.- Parameters:
requiredValue- (undocumented)- Returns:
- (undocumented)
-
um
public Unmarshaller<java.lang.String,T> um()
-
withDefault
public NameDefaultUnmarshallerReceptacle<T> withDefault(T default_)
Extract the optional value asT, if it is missing use the given default value.- Parameters:
default_- (undocumented)- Returns:
- (undocumented)
-
-