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