Package io.temporal.activity
Interface ManualActivityCompletionClient
-
public interface ManualActivityCompletionClientThis 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 voidcomplete(java.lang.Object result)Completes the activity execution successfully.voidfail(java.lang.Throwable failure)Completes the activity execution with failure.voidrecordHeartbeat(java.lang.Object details)voidreportCancellation(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-
-
-