Class ContinuationInstrument

java.lang.Object
rife.workflow.config.ContinuationInstrument
All Implemented Interfaces:
ContinuationConfigInstrument

public class ContinuationInstrument extends Object implements ContinuationConfigInstrument
Byte-code instrumentation configuration that is needed for continuations to work for the workflow engine. This class should not be used directly.
Since:
1.0
  • Constructor Details

    • ContinuationInstrument

      public ContinuationInstrument()
  • Method Details

    • getContinuableMarkerInterfaceName

      public String getContinuableMarkerInterfaceName()
      Description copied from interface: ContinuationConfigInstrument
      The name of the interface that will indicate that a class should be instrumented for continuations functionalities, for instance ContinuableObject.class.getName().
      Specified by:
      getContinuableMarkerInterfaceName in interface ContinuationConfigInstrument
      Returns:
      the name of the marker interface
    • getEntryMethodName

      public String getEntryMethodName()
      Description copied from interface: ContinuationConfigInstrument
      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".
      Specified by:
      getEntryMethodName in interface ContinuationConfigInstrument
      Returns:
      the name of the entry method
    • getEntryMethodDescriptor

      public String getEntryMethodDescriptor()
      Description copied from interface: ContinuationConfigInstrument
      The 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:
      getEntryMethodDescriptor in interface ContinuationConfigInstrument
      Returns:
      the ASM method descriptor for the entry method
    • getCallMethodName

      public String getCallMethodName()
      Description copied from interface: ContinuationConfigInstrument
      The name of the method that will trigger a call continuation, for instance "call".
      Specified by:
      getCallMethodName in interface ContinuationConfigInstrument
      Returns:
      the name of the call method; or null if you don't use call/answer continuations
    • getCallMethodDescriptor

      public String getCallMethodDescriptor()
      Description copied from interface: ContinuationConfigInstrument
      The 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 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.

      Specified by:
      getCallMethodDescriptor in interface ContinuationConfigInstrument
      Returns:
      the ASM method descriptor of the call method
    • getCallMethodReturnTypeName

      public String getCallMethodReturnTypeName()
      Description copied from interface: ContinuationConfigInstrument
      The 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:
      getCallMethodReturnTypeName in interface ContinuationConfigInstrument
      Returns:
      the ASM return type name of the call method