Package io.temporal.activity
Interface ManualActivityCompletionClient
-
public interface ManualActivityCompletionClient
This client is attached to a specific activity execution and let user report completion (successful, failed or confirm cancellation) and perform heartbeats.May be obtained by calling
ActivityExecutionContext.useLocalManualCompletion()
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
complete(java.lang.Object result)
Completes the activity execution successfully.void
fail(java.lang.Throwable failure)
Completes the activity execution with failure.void
recordHeartbeat(java.lang.Object details)
void
reportCancellation(java.lang.Object details)
Confirms successful cancellation to the server.
-
-
-
Method Detail
-
complete
void complete(@Nullable java.lang.Object result)
Completes the activity execution successfully.- Parameters:
result
- of the activity execution
-
fail
void fail(@Nonnull java.lang.Throwable failure)
Completes the activity execution with failure.- Parameters:
failure
- the exception to be used as a failure details object
-
recordHeartbeat
void recordHeartbeat(@Nullable java.lang.Object details) throws CanceledFailure
- Throws:
CanceledFailure
-
reportCancellation
void reportCancellation(@Nullable java.lang.Object details)
Confirms successful cancellation to the server.- Parameters:
details
-
-
-