public final class TransformationRejection extends java.lang.Object implements TransformationRejection, Rejection, scala.Product, java.io.Serializable
Consider this route structure for example:
put { reject(ValidationRejection("no") } ~ get { ... }
If this structure is applied to a PUT request the list of rejections coming back contains three elements:
1. A ValidationRejection 2. A MethodRejection 3. A TransformationRejection holding a function filtering out the MethodRejection
so that in the end the RejectionHandler will only see one rejection (the ValidationRejection), because the
MethodRejection added by the get
directive is canceled by the put
directive (since the HTTP method
did indeed match eventually).
Constructor and Description |
---|
TransformationRejection(scala.Function1<scala.collection.immutable.Seq<Rejection>,scala.collection.immutable.Seq<Rejection>> transform) |
Modifier and Type | Method and Description |
---|---|
abstract static R |
apply(T1 v1) |
java.lang.Object |
getTransform() |
static java.lang.String |
toString() |
scala.Function1<scala.collection.immutable.Seq<Rejection>,scala.collection.immutable.Seq<Rejection>> |
transform() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public abstract static R apply(T1 v1)
public static java.lang.String toString()
public scala.Function1<scala.collection.immutable.Seq<Rejection>,scala.collection.immutable.Seq<Rejection>> transform()
public java.lang.Object getTransform()
getTransform
in interface TransformationRejection