Table of Contents

Class GatewayOrchestrator

Namespace
JD.AI.Gateway.Services
Assembly
JD.AI.Gateway.dll

Hosted service that orchestrates gateway startup: registers channels from config, auto-connects channels, auto-spawns agents, wires message routing, and registers JD.AI agents with OpenClaw.

public sealed class GatewayOrchestrator : IHostedService
Inheritance
GatewayOrchestrator
Implements
Inherited Members

Constructors

GatewayOrchestrator(GatewayConfig, ChannelFactory, IChannelRegistry, AgentPoolService, AgentRouter, IEventBus, ILogger<GatewayOrchestrator>, IHostApplicationLifetime, OpenClawAgentRegistrar?, OpenClawBridgeChannel?, ICommandRegistry?)

public GatewayOrchestrator(GatewayConfig config, ChannelFactory channelFactory, IChannelRegistry channels, AgentPoolService agentPool, AgentRouter router, IEventBus events, ILogger<GatewayOrchestrator> logger, IHostApplicationLifetime hostLifetime, OpenClawAgentRegistrar? agentRegistrar = null, OpenClawBridgeChannel? openClawBridge = null, ICommandRegistry? commandRegistry = null)

Parameters

config GatewayConfig
channelFactory ChannelFactory
channels IChannelRegistry
agentPool AgentPoolService
router AgentRouter
events IEventBus
logger ILogger<GatewayOrchestrator>
hostLifetime IHostApplicationLifetime
agentRegistrar OpenClawAgentRegistrar
openClawBridge OpenClawBridgeChannel
commandRegistry ICommandRegistry

Methods

StartAsync(CancellationToken)

Triggered when the application host is ready to start the service.

public Task StartAsync(CancellationToken cancellationToken)

Parameters

cancellationToken CancellationToken

Indicates that the start process has been aborted.

Returns

Task

A Task that represents the asynchronous Start operation.

StopAsync(CancellationToken)

Triggered when the application host is performing a graceful shutdown.

public Task StopAsync(CancellationToken cancellationToken)

Parameters

cancellationToken CancellationToken

Indicates that the shutdown process should no longer be graceful.

Returns

Task

A Task that represents the asynchronous Stop operation.