Class ContinuationInstrument
- All Implemented Interfaces:
ContinuationConfigInstrument
- Since:
- 1.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionThe ASM method descriptor of the call method, this includes the arguments and the return types.The name of the method that will trigger a call continuation, for instance"call".The ASM return type name of the call method, for instance"java/lang/Object".The name of the interface that will indicate that a class should be instrumented for continuations functionalities, for instanceContinuableObject.class.getName().The ASM method descriptor of the entry method, this includes the arguments and the return types.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".Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface rife.continuations.ContinuationConfigInstrument
getAnswerMethodName, getContinuableSupportClassName, getPauseMethodName, getStepBackMethodName
-
Constructor Details
-
ContinuationInstrument
public ContinuationInstrument()
-
-
Method Details
-
getContinuableMarkerInterfaceName
Description copied from interface:ContinuationConfigInstrumentThe name of the interface that will indicate that a class should be instrumented for continuations functionalities, for instanceContinuableObject.class.getName().- Specified by:
getContinuableMarkerInterfaceNamein interfaceContinuationConfigInstrument- Returns:
- the name of the marker interface
-
getEntryMethodName
Description copied from interface:ContinuationConfigInstrumentThe 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".- Specified by:
getEntryMethodNamein interfaceContinuationConfigInstrument- Returns:
- the name of the entry method
-
getEntryMethodDescriptor
Description copied from interface:ContinuationConfigInstrumentThe ASM method descriptor of the entry method, this includes the arguments and the return types. If there's no arguments nor return types, this is"()V".- Specified by:
getEntryMethodDescriptorin interfaceContinuationConfigInstrument- Returns:
- the ASM method descriptor for the entry method
-
getCallMethodName
Description copied from interface:ContinuationConfigInstrumentThe name of the method that will trigger a call continuation, for instance"call".- Specified by:
getCallMethodNamein interfaceContinuationConfigInstrument- Returns:
- the name of the call method; or
nullif you don't use call/answer continuations
-
getCallMethodDescriptor
Description copied from interface:ContinuationConfigInstrumentThe ASM method descriptor of the call method, this includes the arguments and the return types. For instance""(Ljava/lang/Object;)Ljava/lang/Object;""This includes the return type name that's also provided by
ContinuationConfigInstrument.getCallMethodReturnTypeName().The array argument types that the call method takes, 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
BasicContinuableRunneris used,CallTargetRetrieverwill be used to resolve the target of the call continuation by using the what's provided as the argument of the method call.- Specified by:
getCallMethodDescriptorin interfaceContinuationConfigInstrument- Returns:
- the ASM method descriptor of the call method
-
getCallMethodReturnTypeName
Description copied from interface:ContinuationConfigInstrumentThe ASM return type name of the call method, for instance"java/lang/Object".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
"java/lang/Object").- Specified by:
getCallMethodReturnTypeNamein interfaceContinuationConfigInstrument- Returns:
- the ASM return type name of the call method
-