Package play
Class Invocation
java.lang.Object
play.Invocation
- All Implemented Interfaces:
Runnable
- Direct Known Subclasses:
Job
An Invocation in something to run in a Play! context
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidafter()Things to do after an Invocation.voidbefore()Things to do before an Invocationabstract voidexecute()Override this methodabstract InvocationContextbooleaninit()Init the call (especially useful in DEV mode to detect changes)voidonActionInvocationException(Http.Request request, Http.Response response, Throwable e) voidThings to do when the whole invocation has succeeded (before + execute + after)protected voidpreInit()Needs this method to do stuff *before* init() is executed.
-
Constructor Details
-
Invocation
public Invocation()
-
-
Method Details
-
execute
public abstract void execute()Override this method -
preInit
protected void preInit()Needs this method to do stuff *before* init() is executed. The different Invocation-implementations does a lot of stuff in init() and they might do it before calling super.init() -
init
Init the call (especially useful in DEV mode to detect changes)- Returns:
- true if successful
- Throws:
IOException
-
getInvocationContext
-
before
public void before()Things to do before an Invocation -
after
public void after()Things to do after an Invocation. (if the Invocation code has not thrown any exception) -
onSuccess
Things to do when the whole invocation has succeeded (before + execute + after)- Throws:
Exception
-
onActionInvocationException
-