ActionRefiner

play.api.mvc.ActionRefiner
trait ActionRefiner[-R[_], +P[_]] extends ActionFunction[R, P]

A simple kind of ActionFunction which, given a request (of type R), may either immediately produce a Result (for example, an error), or call its Action block with a parameter (of type P). The critical (abstract) function is refine.

Attributes

Graph
Supertypes
trait ActionFunction[R, P]
class Object
trait Matchable
class Any
Known subtypes
trait ActionFilter[R]
trait ActionTransformer[R, P]

Members list

Value members

Abstract methods

protected def refine[A](request: R[A]): Future[Either[Result, P[A]]]

Determine how to process a request. This is the main method that an ActionRefiner has to implement. It can decide to immediately intercept the request and return a Result (Left), or continue processing with a new parameter of type P (Right).

Determine how to process a request. This is the main method that an ActionRefiner has to implement. It can decide to immediately intercept the request and return a Result (Left), or continue processing with a new parameter of type P (Right).

Value parameters

request

the input request

Attributes

Returns

Either a result or a new parameter to pass to the Action block

Concrete methods

final def invokeBlock[A](request: R[A], block: (P[A]) => Future[Result]): Future[Result]

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.

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.

Value parameters

block

The block of code to invoke

request

The request

Attributes

Returns

A future of the result

Inherited methods

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.

Value parameters

other

ActionFunction with which to compose

Attributes

Returns

The new ActionFunction

Inherited from:
ActionFunction
def compose[B](other: ActionBuilder[R, B]): ActionBuilder[P, B]

Attributes

Inherited from:
ActionFunction
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.

Value parameters

other

ActionFunction with which to compose

Attributes

Returns

The new ActionFunction

Inherited from:
ActionFunction

Inherited and Abstract methods

Attributes

Returns

The execution context to run the request in.

Inherited from:
ActionFunction