Package play
Class Invocation
- java.lang.Object
-
- play.Invocation
-
- All Implemented Interfaces:
java.lang.Runnable
- Direct Known Subclasses:
Job
public abstract class Invocation extends java.lang.Object implements java.lang.Runnable
An 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
after()
Things to do after an Invocation.void
before()
Things to do before an Invocationabstract void
execute()
Override this methodabstract InvocationContext
getInvocationContext()
boolean
init()
Init the call (especially useful in DEV mode to detect changes)void
onActionInvocationException(Http.Request request, Http.Response response, java.lang.Throwable e)
void
onQueued()
protected void
onStarted()
void
onSuccess()
Things to do when the whole invocation has succeeded (before + execute + after)protected void
preInit()
Needs this method to do stuff *before* init() is executed.
-
-
-
Method Detail
-
onQueued
public void onQueued()
-
onStarted
protected void onStarted()
-
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
public boolean init() throws java.io.IOException
Init the call (especially useful in DEV mode to detect changes)- Returns:
- true if successful
- Throws:
java.io.IOException
-
getInvocationContext
public abstract 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.Exception
Things to do when the whole invocation has succeeded (before + execute + after)- Throws:
java.lang.Exception
-
onActionInvocationException
public void onActionInvocationException(Http.Request request, Http.Response response, java.lang.Throwable e)
-
-