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
-
-
Constructor Summary
Constructors Constructor Description ActivityTaskHandlerImpl(java.lang.String namespace, 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.void
registerActivityImplementations(java.lang.Object[] activitiesImplementation)
-
-
-
Constructor Detail
-
ActivityTaskHandlerImpl
public ActivityTaskHandlerImpl(@Nonnull java.lang.String namespace, @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
-
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 exception 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.
-
-