Packages

t

akka.http.javadsl.server

TransformationRejection

trait TransformationRejection extends Rejection

A special Rejection that serves as a container for a transformation function on rejections. It is used by some directives to "cancel" rejections that are added by later directives of a similar type.

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).

Annotations
@DoNotInherit()
Source
Rejections.scala
Linear Supertypes
Known Subclasses
Type Hierarchy
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. TransformationRejection
  2. Rejection
  3. AnyRef
  4. Any
Implicitly
  1. by any2stringadd
  2. by StringFormat
  3. by Ensuring
  4. by ArrowAssoc
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Abstract Value Members

  1. abstract def getTransform: Function[Iterable[Rejection], Iterable[Rejection]]