Package com.uber.cadence.client
Interface ActivityCompletionClient
-
public interface ActivityCompletionClient
Used to complete asynchronously activities that calledActivity.doNotCompleteOnReturn()
.Use
WorkflowClient.newActivityCompletionClient()
to create an instance. TODO: Throw relevant exceptions like EntityNotExists, etc.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description <R> void
complete(byte[] taskToken, R result)
<R> void
complete(WorkflowExecution execution, java.lang.String activityId, R result)
void
completeExceptionally(byte[] taskToken, java.lang.Exception result)
void
completeExceptionally(WorkflowExecution execution, java.lang.String activityId, java.lang.Exception result)
<V> void
heartbeat(byte[] taskToken, V details)
<V> void
heartbeat(WorkflowExecution execution, java.lang.String activityId, V details)
Warning: heartbeating by ids is not implemented yet.<V> void
reportCancellation(byte[] taskToken, V details)
<V> void
reportCancellation(WorkflowExecution execution, java.lang.String activityId, V details)
-
-
-
Method Detail
-
complete
<R> void complete(byte[] taskToken, R result) throws ActivityCompletionException
- Throws:
ActivityCompletionException
-
complete
<R> void complete(WorkflowExecution execution, 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(WorkflowExecution execution, 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(WorkflowExecution execution, 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(WorkflowExecution execution, java.lang.String activityId, V details) throws ActivityCompletionException
Warning: heartbeating by ids is not implemented yet.- Throws:
java.util.concurrent.CancellationException
- if activity is cancelled.ActivityCompletionException
-
-