Class ActivityTaskHandlerImpl
java.lang.Object
io.temporal.internal.activity.ActivityTaskHandlerImpl
- All Implemented Interfaces:
ActivityTaskHandler
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.temporal.internal.worker.ActivityTaskHandler
ActivityTaskHandler.Result -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionActivityTaskHandlerImpl(String namespace, String taskQueue, DataConverter dataConverter, ActivityExecutionContextFactory executionContextFactory, WorkerInterceptor[] interceptors, List<ContextPropagator> contextPropagators) -
Method Summary
Modifier and TypeMethodDescriptionhandle(ActivityTask activityTask, com.uber.m3.tally.Scope metricsScope, boolean localActivity) The implementation should be called when a polling activity worker receives a new activity task.booleanTrue if this handler handles at least one activity type.booleanisTypeSupported(String type) voidregisterActivityImplementations(Object[] activitiesImplementation) booleanrequestCancel(byte[] taskToken)
-
Field Details
-
ACTIVITY_HANDLER_STACKTRACE_CUTOFF
public static final com.google.common.collect.ImmutableSet<String> ACTIVITY_HANDLER_STACKTRACE_CUTOFF
-
-
Constructor Details
-
ActivityTaskHandlerImpl
public ActivityTaskHandlerImpl(@Nonnull String namespace, @Nonnull String taskQueue, @Nonnull DataConverter dataConverter, @Nonnull ActivityExecutionContextFactory executionContextFactory, @Nonnull WorkerInterceptor[] interceptors, @Nullable List<ContextPropagator> contextPropagators)
-
-
Method Details
-
isAnyTypeSupported
public boolean isAnyTypeSupported()Description copied from interface:ActivityTaskHandlerTrue if this handler handles at least one activity type.- Specified by:
isAnyTypeSupportedin interfaceActivityTaskHandler
-
isTypeSupported
- Specified by:
isTypeSupportedin interfaceActivityTaskHandler- Parameters:
type- activity type name- Returns:
- true if an activity implementation with
activityTypename is registered or a dynamic activity implementation is registered.
-
requestCancel
public boolean requestCancel(byte[] taskToken) -
registerActivityImplementations
-
handle
public ActivityTaskHandler.Result handle(ActivityTask activityTask, com.uber.m3.tally.Scope metricsScope, boolean localActivity) Description copied from interface:ActivityTaskHandlerThe implementation should be called when a polling activity worker receives a new activity task. This method shouldn't throw any Throwables unless there is a need to not reply to the task.- Specified by:
handlein interfaceActivityTaskHandler- Parameters:
activityTask- activity task which is response to PollActivityTaskQueue call.- Returns:
- One of the possible activity task replies.
-