Package io.temporal.worker
Interface WorkflowTaskDispatchHandle.DispatchCallback
-
- All Superinterfaces:
java.util.function.Function<WorkflowTask,java.lang.Boolean>
- Enclosing class:
- WorkflowTaskDispatchHandle
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface public static interface WorkflowTaskDispatchHandle.DispatchCallback extends java.util.function.Function<WorkflowTask,java.lang.Boolean>
A callback into aWorkflowWorker
to dispatch a workflow task
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.Boolean
apply(WorkflowTask workflowTask)
Should dispatch the Workflow Task to the Workflow Worker.
-
-
-
Method Detail
-
apply
java.lang.Boolean apply(WorkflowTask workflowTask) throws java.lang.IllegalArgumentException
Should dispatch the Workflow Task to the Workflow Worker. Shouldn't block the thread.- Specified by:
apply
in interfacejava.util.function.Function<WorkflowTask,java.lang.Boolean>
- Parameters:
workflowTask
- WorkflowTask to be dispatched- Returns:
- true if the dispatch was successful and false otherwise
- Throws:
java.lang.IllegalArgumentException
- ifworkflowTask
doesn't belong to the task queue of the Worker that provided theWorkflowTaskDispatchHandle
-
-