trait Action[A] extends EssentialAction
An action is essentially a (Request[A] => Result) function that handles a request and generates a result to be sent to the client.
For example,
val echo = Action { request => Ok("Got request [" + request + "]") }
- A
the type of the request body
- Source
- Action.scala
- Alphabetic
- By Inheritance
- Action
- EssentialAction
- Handler
- Function1
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Type Members
- type BODY_CONTENT = A
Type of the request body.
Abstract Value Members
- abstract def apply(request: Request[A]): Future[Result]
Invokes this action.
Invokes this action.
- request
the incoming HTTP request
- returns
the result to be sent to the client
- abstract def executionContext: ExecutionContext
- returns
The execution context to run the action in
- abstract def parser: BodyParser[A]
Body parser associated with this action.
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[A](g: (Accumulator[ByteString, Result]) => A): (RequestHeader) => A
- Definition Classes
- Function1
- Annotations
- @unspecialized()
- def apply(): Action[A]
- returns
itself, for better support in the routes file.
- Definition Classes
- Action → EssentialAction
- def apply(rh: RequestHeader): Accumulator[ByteString, Result]
- Definition Classes
- Action → Function1
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def asJava: mvc.EssentialAction
- Definition Classes
- EssentialAction
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @HotSpotIntrinsicCandidate() @native()
- def compose[A](g: (A) => RequestHeader): (A) => Accumulator[ByteString, Result]
- Definition Classes
- Function1
- Annotations
- @unspecialized()
- 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
- Action → Function1 → 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)