play
Class Invoker.Invocation

java.lang.Object
  extended by 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.Runnable

An Invocation in something to run in a Play! context


Constructor Summary
Invoker.Invocation()
           
 
Method Summary
 void _finally()
          Things to do in all cases after the invocation.
 void after()
          Things to do after an Invocation.
 void before()
          Things to do before an Invocation
abstract  void execute()
          Override this method
abstract  Invoker.InvocationContext getInvocationContext()
           
 boolean init()
          Init the call (especially usefull in DEV mode to detect changes)
 void onException(java.lang.Throwable e)
          Things to do if the Invocation code thrown an exception
 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.
 void run()
          It's time to execute.
 void suspend(Invoker.Suspend suspendRequest)
          The request is suspended
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Invoker.Invocation

public Invoker.Invocation()
Method Detail

execute

public abstract void execute()
                      throws java.lang.Exception
Override this method

Throws:
java.lang.Exception

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 usefull in DEV mode to detect changes)


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.Exception
Things to do when the whole invocation has succeeded (before + execute + after)

Throws:
java.lang.Exception

onException

public void onException(java.lang.Throwable e)
Things to do if the Invocation code thrown an exception


suspend

public void suspend(Invoker.Suspend suspendRequest)
The request is suspended

Parameters:
suspendRequest -

_finally

public void _finally()
Things to do in all cases after the invocation.


run

public void run()
It's time to execute.

Specified by:
run in interface java.lang.Runnable


Guillaume Bort & zenexity - Distributed under Apache 2 licence, without any warrantly