Package io.temporal.client
Interface ActivityCompletionClient
-
public interface ActivityCompletionClient
Used to complete asynchronously activities that calledActivityExecutionContext.doNotCompleteOnReturn()
.Use
WorkflowClient.newActivityCompletionClient()
to create an instance.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description <R> void
complete(byte[] taskToken, R result)
<R> void
complete(java.lang.String workflowId, java.util.Optional<java.lang.String> runId, java.lang.String activityId, R result)
void
completeExceptionally(byte[] taskToken, java.lang.Exception result)
void
completeExceptionally(java.lang.String workflowId, java.util.Optional<java.lang.String> runId, java.lang.String activityId, java.lang.Exception result)
<V> void
heartbeat(byte[] taskToken, V details)
<V> void
heartbeat(java.lang.String workflowId, java.util.Optional<java.lang.String> runId, java.lang.String activityId, V details)
<V> void
reportCancellation(byte[] taskToken, V details)
<V> void
reportCancellation(java.lang.String workflowId, java.util.Optional<java.lang.String> runId, java.lang.String activityId, V details)
-
-
-
Method Detail
-
complete
<R> void complete(byte[] taskToken, R result) throws ActivityCompletionException
- Throws:
ActivityCompletionException
-
complete
<R> void complete(java.lang.String workflowId, java.util.Optional<java.lang.String> runId, java.lang.String activityId, R result) throws ActivityCompletionException
- Throws:
ActivityCompletionException
-
completeExceptionally
void completeExceptionally(byte[] taskToken, java.lang.Exception result) throws ActivityCompletionException
- Throws:
ActivityCompletionException
-
completeExceptionally
void completeExceptionally(java.lang.String workflowId, java.util.Optional<java.lang.String> runId, java.lang.String activityId, java.lang.Exception result) throws ActivityCompletionException
- Throws:
ActivityCompletionException
-
reportCancellation
<V> void reportCancellation(byte[] taskToken, V details) throws ActivityCompletionException
- Throws:
ActivityCompletionException
-
reportCancellation
<V> void reportCancellation(java.lang.String workflowId, java.util.Optional<java.lang.String> runId, java.lang.String activityId, V details) throws ActivityCompletionException
- Throws:
ActivityCompletionException
-
heartbeat
<V> void heartbeat(byte[] taskToken, V details) throws ActivityCompletionException
- Throws:
ActivityCompletionException
-
heartbeat
<V> void heartbeat(java.lang.String workflowId, java.util.Optional<java.lang.String> runId, java.lang.String activityId, V details) throws ActivityCompletionException
- Throws:
ActivityCompletionException
- if activity should stop executing
-
-