trait ActionFunction[-R[_], +P[_]] extends AnyRef
A builder for generic Actions that generalizes over the type of requests. An ActionFunction[R,P] may be chained onto an existing ActionBuilder[R] to produce a new ActionBuilder[P] using andThen. The critical (abstract) function is invokeBlock. Most users will want to use ActionBuilder instead.
- R
the type of the request on which this is invoked (input)
- P
the parameter type which blocks executed by this builder take (output)
- Self Type
- ActionFunction[R, P]
- Source
- Action.scala
- Alphabetic
- By Inheritance
- ActionFunction
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Abstract Value Members
- abstract def executionContext: ExecutionContext
- returns
The execution context to run the request in.
- Attributes
- protected
- abstract def invokeBlock[A](request: R[A], block: (P[A]) => Future[Result]): Future[Result]
Invoke the block.
Invoke the block. This is the main method that an ActionBuilder has to implement, at this stage it can wrap it in any other actions, modify the request object or potentially use a different class to represent the request.
- request
The request
- block
The block of code to invoke
- returns
A future of the result
Concrete Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def andThen[Q[_]](other: ActionFunction[P, Q]): ActionFunction[R, Q]
Compose this ActionFunction with another, with this one applied first.
Compose this ActionFunction with another, with this one applied first.
- other
ActionFunction with which to compose
- returns
The new ActionFunction
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @HotSpotIntrinsicCandidate() @native()
- def compose[B](other: ActionBuilder[R, B]): ActionBuilder[P, B]
- def compose[Q[_]](other: ActionFunction[Q, R]): ActionFunction[Q, P]
Compose another ActionFunction with this one, with this one applied last.
Compose another ActionFunction with this one, with this one applied last.
- other
ActionFunction with which to compose
- returns
The new ActionFunction
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @HotSpotIntrinsicCandidate() @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @HotSpotIntrinsicCandidate() @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @HotSpotIntrinsicCandidate() @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @HotSpotIntrinsicCandidate() @native()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated
(Since version 9)