Class LocalActivityStubImpl

  • All Implemented Interfaces:
    ActivityStub

    public class LocalActivityStubImpl
    extends java.lang.Object
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      <T> T execute​(java.lang.String activityName, java.lang.Class<T> resultClass, java.lang.Object... args)
      Executes an activity by its type name and arguments.
      <T> T execute​(java.lang.String activityName, java.lang.Class<T> resultClass, java.lang.reflect.Type resultType, java.lang.Object... args)
      Executes an activity by its type name and arguments.
      <R> Promise<R> executeAsync​(java.lang.String activityName, java.lang.Class<R> resultClass, java.lang.Object... args)
      Executes an activity asynchronously by its type name and arguments.
      <R> Promise<R> executeAsync​(java.lang.String activityName, java.lang.Class<R> resultClass, java.lang.reflect.Type resultType, java.lang.Object... args)
      Executes an activity asynchronously by its type name and arguments.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • executeAsync

        public <R> Promise<R> executeAsync​(java.lang.String activityName,
                                           java.lang.Class<R> resultClass,
                                           java.lang.reflect.Type resultType,
                                           java.lang.Object... args)
        Description copied from interface: ActivityStub
        Executes an activity asynchronously by its type name and arguments.
        Specified by:
        executeAsync in interface ActivityStub
        Type Parameters:
        R - return type.
        Parameters:
        activityName - name of an activity type to execute.
        resultClass - the expected return class of the activity. Use Void.class for activities that return void type.
        resultType - the expected return type of the activity. Differs from resultClass for generic types.
        args - arguments of the activity.
        Returns:
        Promise to the activity result.
      • execute

        public <T> T execute​(java.lang.String activityName,
                             java.lang.Class<T> resultClass,
                             java.lang.Object... args)
        Description copied from interface: ActivityStub
        Executes an activity by its type name and arguments. Blocks until the activity completion.
        Specified by:
        execute in interface ActivityStub
        Type Parameters:
        T - return type.
        Parameters:
        activityName - name of an activity type to execute.
        resultClass - the expected return type of the activity. Use Void.class for activities that return void type.
        args - arguments of the activity.
        Returns:
        an activity result.
      • execute

        public <T> T execute​(java.lang.String activityName,
                             java.lang.Class<T> resultClass,
                             java.lang.reflect.Type resultType,
                             java.lang.Object... args)
        Description copied from interface: ActivityStub
        Executes an activity by its type name and arguments. Blocks until the activity completion.
        Specified by:
        execute in interface ActivityStub
        Type Parameters:
        T - return type.
        Parameters:
        activityName - name of an activity type to execute.
        resultClass - the expected return class of the activity. Use Void.class for activities that return void type.
        resultType - the expected return type of the activity. Differs from resultClass for generic types.
        args - arguments of the activity.
        Returns:
        an activity result.
      • executeAsync

        public <R> Promise<R> executeAsync​(java.lang.String activityName,
                                           java.lang.Class<R> resultClass,
                                           java.lang.Object... args)
        Description copied from interface: ActivityStub
        Executes an activity asynchronously by its type name and arguments.
        Specified by:
        executeAsync in interface ActivityStub
        Type Parameters:
        R - return type.
        Parameters:
        activityName - name of an activity type to execute.
        resultClass - the expected return type of the activity. Use Void.class for activities that return void type.
        args - arguments of the activity.
        Returns:
        Promise to the activity result.