Class Activity
java.lang.Object
io.temporal.activity.Activity
An Activity is the implementation of a particular task in the business logic.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionstatic ActivityExecutionContextCan be used to get information about an Activity Execution and to invoke Heartbeats.static RuntimeExceptionUse this to rethrow a checked exception from an Activity Execution instead of adding the exception to a method signature.
-
Method Details
-
getExecutionContext
Can be used to get information about an Activity Execution and to invoke Heartbeats. This static method relies on a thread-local variable and works only in the original Activity Execution thread. -
wrap
Use this to rethrow a checked exception from an Activity Execution instead of adding the exception to a method signature.- Returns:
- Never returns; always throws. Throws original exception if e is
RuntimeExceptionorError.
-