Package io.temporal.internal.activity
Class ActivityTaskHandlerImpl
- java.lang.Object
-
- io.temporal.internal.activity.ActivityTaskHandlerImpl
-
- All Implemented Interfaces:
ActivityTaskHandler
public final class ActivityTaskHandlerImpl extends java.lang.Object implements ActivityTaskHandler
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface io.temporal.internal.worker.ActivityTaskHandler
ActivityTaskHandler.Result
-
-
Field Summary
Fields Modifier and Type Field Description static com.google.common.collect.ImmutableSet<java.lang.String>
ACTIVITY_HANDLER_STACKTRACE_CUTOFF
-
Constructor Summary
Constructors Constructor Description ActivityTaskHandlerImpl(java.lang.String namespace, java.lang.String taskQueue, DataConverter dataConverter, ActivityExecutionContextFactory executionContextFactory, WorkerInterceptor[] interceptors, java.util.List<ContextPropagator> contextPropagators)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ActivityTaskHandler.Result
handle(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.boolean
isAnyTypeSupported()
True if this handler handles at least one activity type.boolean
isTypeSupported(java.lang.String type)
void
registerActivityImplementations(java.lang.Object[] activitiesImplementation)
-
-
-
Constructor Detail
-
ActivityTaskHandlerImpl
public ActivityTaskHandlerImpl(@Nonnull java.lang.String namespace, @Nonnull java.lang.String taskQueue, @Nonnull DataConverter dataConverter, @Nonnull ActivityExecutionContextFactory executionContextFactory, @Nonnull WorkerInterceptor[] interceptors, @Nullable java.util.List<ContextPropagator> contextPropagators)
-
-
Method Detail
-
isAnyTypeSupported
public boolean isAnyTypeSupported()
Description copied from interface:ActivityTaskHandler
True if this handler handles at least one activity type.- Specified by:
isAnyTypeSupported
in interfaceActivityTaskHandler
-
isTypeSupported
public boolean isTypeSupported(java.lang.String type)
- Specified by:
isTypeSupported
in interfaceActivityTaskHandler
- Parameters:
type
- activity type name- Returns:
- true if an activity implementation with
activityType
name is registered or a dynamic activity implementation is registered.
-
registerActivityImplementations
public void registerActivityImplementations(java.lang.Object[] activitiesImplementation)
-
handle
public ActivityTaskHandler.Result handle(ActivityTask activityTask, com.uber.m3.tally.Scope metricsScope, boolean localActivity)
Description copied from interface:ActivityTaskHandler
The 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:
handle
in interfaceActivityTaskHandler
- Parameters:
activityTask
- activity task which is response to PollActivityTaskQueue call.- Returns:
- One of the possible activity task replies.
-
-