Executor<TInput,TOutput> Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Provides a simple executor implementation that uses a single message handler function to process incoming messages.
public abstract class Executor<TInput,TOutput> : Microsoft.Agents.AI.Workflows.Executor, Microsoft.Agents.AI.Workflows.Reflection.IMessageHandler<TInput,TOutput>
type Executor<'Input, 'Output> = class
inherit Executor
interface IMessageHandler<'Input, 'Output>
Public MustInherit Class Executor(Of TInput, TOutput)
Inherits Executor
Implements IMessageHandler(Of TInput, TOutput)
Type Parameters
- TInput
The type of input message.
- TOutput
The type of output message.
- Inheritance
- Derived
- Implements
-
IMessageHandler<TInput,TOutput>
Constructors
| Name | Description |
|---|---|
| Executor<TInput,TOutput>(String, ExecutorOptions, Boolean) |
Provides a simple executor implementation that uses a single message handler function to process incoming messages. |
Properties
| Name | Description |
|---|---|
| Id |
A unique identifier for the executor. (Inherited from Executor) |
| InputTypes |
A set of Types, representing the messages this executor can handle. (Inherited from Executor) |
| Options |
Gets the configuration options for the executor. (Inherited from Executor) |
| OutputTypes |
A set of Types, representing the messages this executor can produce as output. (Inherited from Executor) |
Methods
| Name | Description |
|---|---|
| CanHandle(Type) |
Checks if the executor can handle a specific message type. (Inherited from Executor) |
| ConfigureProtocol(ProtocolBuilder) |
Configures the protocol by setting up routes and declaring the message types used for sending and yielding output. |
| DescribeProtocol() |
Describes the protocol for communication with this Executor. (Inherited from Executor) |
| ExecuteCoreAsync(Object, TypeId, IWorkflowContext, CancellationToken) |
Process an incoming message using the registered handlers. (Inherited from Executor) |
| HandleAsync(TInput, IWorkflowContext, CancellationToken) |
Handles the incoming message asynchronously. |
| InitializeAsync(IWorkflowContext, CancellationToken) |
Perform any asynchronous initialization required by the executor. This method is called once per executor instance, (Inherited from Executor) |
| OnCheckpointingAsync(IWorkflowContext, CancellationToken) |
Invoked before a checkpoint is saved, allowing custom pre-save logic in derived classes. (Inherited from Executor) |
| OnCheckpointRestoredAsync(IWorkflowContext, CancellationToken) |
Invoked after a checkpoint is loaded, allowing custom post-load logic in derived classes. (Inherited from Executor) |
Extension Methods
| Name | Description |
|---|---|
| BindExecutor(Executor) |
Configures an Executor instance for use in a workflow. |