Package play
Class Invoker.Invocation
- java.lang.Object
-
- play.Invoker.Invocation
-
- All Implemented Interfaces:
java.lang.Runnable
- Direct Known Subclasses:
Invoker.DirectInvocation,Job,PlayHandler.NettyInvocation,PlayHandler.WebSocketInvocation
- Enclosing class:
- Invoker
public abstract static class Invoker.Invocation extends java.lang.Object implements java.lang.RunnableAn Invocation in something to run in a Play! context
-
-
Constructor Summary
Constructors Constructor Description Invocation()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void_finally()Things to do in all cases after the invocation.voidafter()Things to do after an Invocation.voidbefore()Things to do before an Invocationabstract voidexecute()Override this methodabstract Invoker.InvocationContextgetInvocationContext()booleaninit()Init the call (especially useful in DEV mode to detect changes)voidonException(java.lang.Throwable e)Things to do if the Invocation code thrown an exceptionvoidonSuccess()Things to do when the whole invocation has succeeded (before + execute + after)protected voidpreInit()Needs this method to do stuff *before* init() is executed.voidrun()It's time to execute.voidsuspend(Invoker.Suspend suspendRequest)The request is suspended
-
-
-
Method Detail
-
execute
public abstract void execute() throws java.lang.ExceptionOverride this method- Throws:
java.lang.Exception- Thrown if Invocation encounters any problems
-
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
public boolean init()
Init the call (especially useful in DEV mode to detect changes)- Returns:
- true if successful
-
getInvocationContext
public abstract Invoker.InvocationContext 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
public void onSuccess() throws java.lang.ExceptionThings to do when the whole invocation has succeeded (before + execute + after)- Throws:
java.lang.Exception- Thrown if Invoker encounters any problems
-
onException
public void onException(java.lang.Throwable e)
Things to do if the Invocation code thrown an exception- Parameters:
e- The exception
-
suspend
public void suspend(Invoker.Suspend suspendRequest)
The request is suspended- Parameters:
suspendRequest- the suspended request
-
_finally
public void _finally()
Things to do in all cases after the invocation.
-
run
public void run()
It's time to execute.- Specified by:
runin interfacejava.lang.Runnable
-
-