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
- All
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
The execution context to run this action in
The execution context to run this action in
- returns
The execution context to run the action in
-
abstract
def
parser: BodyParser[A]
Body parser associated with this action.
Body parser associated with this action.
- See also
BodyParser
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.
Returns itself, for better support in the routes file.
- returns
itself
- 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( ... ) @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: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @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
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- Action → Function1 → AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()