Class NameUnmarshallerReceptacle<T>

java.lang.Object
org.apache.pekko.http.scaladsl.common.NameUnmarshallerReceptacle<T>

public class NameUnmarshallerReceptacle<T> extends Object
  • Constructor Details

  • Method Details

    • as

      public <B> NameUnmarshallerReceptacle<B> as(Unmarshaller<T,B> unmarshaller)
      Extract the value as the specified type. You need a matching pekko.http.scaladsl.unmarshalling.Unmarshaller in scope for that to work.
      Parameters:
      unmarshaller - (undocumented)
      Returns:
      (undocumented)
    • name

      public String name()
    • optional

      public NameOptionUnmarshallerReceptacle<T> optional()
      Extract the optional value as Option[T]. Symbolic alias for optional().
      Returns:
      (undocumented)
    • repeated

      Extract multiple occurrences as Iterable[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<String,T> um()
    • withDefault

      public NameDefaultUnmarshallerReceptacle<T> withDefault(T default_)
      Extract the optional value as T, if it is missing use the given default value.
      Parameters:
      default_ - (undocumented)
      Returns:
      (undocumented)