RouteBuilder class

Fluent route builder rooted at a workflow executor.

Constructors

RouteBuilder(WorkflowBuilder workflowBuilder, String sourceExecutorId)
Creates a route builder.
const

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
sourceExecutorId → String
Gets the current route source executor identifier.
final
workflowBuilder → WorkflowBuilder
Gets the workflow builder being configured.
final

Methods

addCatchAll(FutureOr<void> handler(Object message, WorkflowContext context, CancellationToken cancellationToken), {String? id}) → RouteBuilder
Creates a catch-all FunctionExecutor that receives any message type not handled by typed executors upstream.
addHandler<TInput>(FutureOr<void> handler(TInput input, WorkflowContext context, CancellationToken cancellationToken), {String? id}) → RouteBuilder
Creates an ActionExecutor from handler and routes the current source to it.
addPortHandler<TRequest, TResponse>(RequestPort<TRequest, TResponse> port, FutureOr<TResponse> handler(TRequest request, WorkflowContext context, CancellationToken cancellationToken), {String? id}) → RouteBuilder
Creates a PortHandlerExecutor that handles external requests arriving on port and routes the current source to it.
addResultHandler<TInput, TResult>(FutureOr<TResult> handler(TInput input, WorkflowContext context, CancellationToken cancellationToken), {String? id}) → RouteBuilder
Creates a FunctionExecutor from handler that produces results of type TResult and routes the current source to it.
fanOutTo(Iterable<String> targetExecutorIds) → WorkflowBuilder
Adds a fan-out edge from the current source to targetExecutorIds.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
to(String targetExecutorId, {Type? messageType}) → RouteBuilder
Routes from the current source to targetExecutorId.
toBinding(ExecutorBinding binding, {Type? messageType}) → RouteBuilder
Adds binding and routes from the current source to it.
toExecutor(Executor executor, {Type? messageType}) → RouteBuilder
Adds executor as a shared instance and routes to it.
toOutput() → WorkflowBuilder
Marks the current source as workflow output.
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited