Package io.temporal.internal.activity
Class POJOActivityTaskHandler
- java.lang.Object
-
- io.temporal.internal.activity.POJOActivityTaskHandler
-
- All Implemented Interfaces:
ActivityTaskHandler
public final class POJOActivityTaskHandler 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 POJOActivityTaskHandler(java.lang.String namespace, DataConverter dataConverter, WorkerInterceptor[] interceptors, ActivityExecutionContextFactory executionContextFactory)
-
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
-
POJOActivityTaskHandler
public POJOActivityTaskHandler(@Nonnull java.lang.String namespace, @Nonnull DataConverter dataConverter, @Nonnull WorkerInterceptor[] interceptors, @Nonnull ActivityExecutionContextFactory executionContextFactory)
-
-
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.
-
-