com.uwyn.rife.continuations
Interface ContinuationConfigInstrument

All Known Implementing Classes:
EngineContinuationConfigInstrument

public interface ContinuationConfigInstrument

This interface needs to be implemented to configure the bytecode instrumentation that enables the continuations functionalities.

Since:
1.6
Version:
$Revision: 3811 $
Author:
Geert Bevin (gbevin[remove] at uwyn dot com)

Method Summary
 String getAnswerMethodName()
          The name of the method that will trigger the answer to a call continuation, for instance "answer".
 Class[] getCallMethodArgumentTypes()
          The array argument types that the call method takes, for instance new Class[] {String.class}.
 String getCallMethodName()
          The name of the method that will trigger a call continuation, for instance "call".
 Class getCallMethodReturnType()
          The return type of the call method, for instance Object.class.
 String getContinuableMarkerInterfaceName()
          The name of the interface that will indicate that a class should be instrumented for continuations functionalities, for instance ContinuableObject.class.getName().
 String getContinuableSupportClassName()
          The class name of the support class that contains dummy implementations of the continuation methods that are configured below, for instance ContinuableSupport.class.getName().
 Class[] getEntryMethodArgumentTypes()
          The array argument types that the entry method takes, for instance null if it takes none.
 String getEntryMethodName()
          The name of the entry method that will be invoked when a new instance of a continuable class is created and its execution is started, for instance "execute".
 Class getEntryMethodReturnType()
          The return type of the entry method, for instance void.class.
 String getPauseMethodName()
          The name of the method that will trigger a pause continuation, for instance "pause".
 String getStepbackMethodName()
          The name of the method that will trigger a step-back continuation, for instance "stepback".
 

Method Detail

getContinuableMarkerInterfaceName

String getContinuableMarkerInterfaceName()
The name of the interface that will indicate that a class should be instrumented for continuations functionalities, for instance ContinuableObject.class.getName().

Returns:
the name of the marker interface
Since:
1.6

getContinuableSupportClassName

String getContinuableSupportClassName()
The class name of the support class that contains dummy implementations of the continuation methods that are configured below, for instance ContinuableSupport.class.getName().

If you implement these methods in your continuable classes or extend these classes from a common base class with those methods that are then called locally, this configuration can return null since it will not be used. A class name only needs to be provided if your continuable classes only implement the marker interface, and you call the continuation methods on an instance of this support inside your continuations logic.

Returns:
the name of the continuable support class; or

null if such a support class isn't used

Since:
1.6

getEntryMethodName

String getEntryMethodName()
The name of the entry method that will be invoked when a new instance of a continuable class is created and its execution is started, for instance "execute".

Returns:
the name of the entry method
Since:
1.6

getEntryMethodReturnType

Class getEntryMethodReturnType()
The return type of the entry method, for instance void.class.

This will solely be used to detect and lookup the method before instrumenting or calling it.

Returns:
the class of the entry method's return value
Since:
1.6

getEntryMethodArgumentTypes

Class[] getEntryMethodArgumentTypes()
The array argument types that the entry method takes, for instance null if it takes none.

This will solely be used to detect and lookup the method before instrumenting or calling it.

Returns:
the array of argument types of the entry method; or null if there are none
Since:
1.6

getPauseMethodName

String getPauseMethodName()
The name of the method that will trigger a pause continuation, for instance "pause".

This method should have a void return type and take no arguments.

Returns:
the name of the pause method
Since:
1.6

getStepbackMethodName

String getStepbackMethodName()
The name of the method that will trigger a step-back continuation, for instance "stepback".

This method should have a void return type and take no arguments.

Returns:
the name of the step-back method
Since:
1.6

getCallMethodName

String getCallMethodName()
The name of the method that will trigger a call continuation, for instance "call".

Returns:
the name of the call method
Since:
1.6

getCallMethodReturnType

Class getCallMethodReturnType()
The return type of the call method, for instance Object.class.

This needs to be an object, not a primitive and you have to be certain that it's compatible with the values that are sent through the answer to the call continuation. It's just recommended to keep this as generic as possible (hence Object.class).

Returns:
the type of the call method's return value
Since:
1.6

getCallMethodArgumentTypes

Class[] getCallMethodArgumentTypes()
The array argument types that the call method takes, for instance new Class[] {String.class}.

This needs to be a single object argument, not more or less than one, and not a primitive. You will use this yourself in the implementation of the runner that executes the continuations. If the BasicContinuableRunner is used, CallTargetRetriever will be used to resolve the target of the call continuation by using the what's provided as the argument of the method call.

Returns:
the array of argument types of the call method
Since:
1.6

getAnswerMethodName

String getAnswerMethodName()
The name of the method that will trigger the answer to a call continuation, for instance "answer".

This method should have a void return type and take one argument with the type java.lang.Object.

Returns:
the name of the answer method
Since:
1.6


Copyright © 2001-2007 Uwyn sprl/bvba. All Rights Reserved.