Class BowireProtocolRegistry

Namespace
Kuestenlogik.Bowire
Assembly
Kuestenlogik.Bowire.dll

Registry of discovered protocol plugins. Scans loaded assemblies for IBowireProtocol implementations.

public sealed class BowireProtocolRegistry
Inheritance
BowireProtocolRegistry
Inherited Members

Constructors

BowireProtocolRegistry()

public BowireProtocolRegistry()

Properties

Protocols

public IReadOnlyList<IBowireProtocol> Protocols { get; }

Property Value

IReadOnlyList<IBowireProtocol>

Methods

Discover(ILogger?)

Auto-discover protocol plugins from loaded assemblies. Pass an ILogger to surface load failures (a buggy plugin DLL or a missing dependency would otherwise vanish silently into the catch block, leaving the user wondering why their plugin doesn't show up).

public static BowireProtocolRegistry Discover(ILogger? logger = null)

Parameters

logger ILogger

Returns

BowireProtocolRegistry

Discover(IEnumerable<string>?, ILogger?)

Same as Discover(ILogger?) but also accepts a list of plugin ids to skip during the scan. Used for the --disable-plugin CLI flag and the Bowire:DisabledPlugins appsettings option — handy when a plugin's load path is broken or its discovery probe is too expensive for the current host's network.

public static BowireProtocolRegistry Discover(IEnumerable<string>? disabledPluginIds, ILogger? logger = null)

Parameters

disabledPluginIds IEnumerable<string>

Plugin ids to exclude. Matched case-insensitively against Id. null or empty means "scan everything", same as the parameterless overload.

logger ILogger

Optional warning logger.

Returns

BowireProtocolRegistry

FindHttpInvoker()

Returns the first registered protocol that also implements IInlineHttpInvoker, or null when no such plugin is loaded. Used by the /api/invoke endpoint's transcoded HTTP path so it can dispatch over HTTP without core having any HTTP-invocation code or dependencies of its own — the REST plugin owns it.

public IInlineHttpInvoker? FindHttpInvoker()

Returns

IInlineHttpInvoker

FindSseSubscriber()

Returns the first registered protocol that also implements IInlineSseSubscriber, or null when no such plugin is loaded. Used by plugins that want to consume an SSE stream without taking a hard compile-time dependency on the SSE plugin (the MCP plugin uses this for server-sent notifications, the GraphQL plugin uses it for graphql-sse subscriptions).

public IInlineSseSubscriber? FindSseSubscriber()

Returns

IInlineSseSubscriber

FindWebSocketChannel()

Returns the first registered protocol that also implements IInlineWebSocketChannel, or null when no such plugin is loaded. Used by plugins that want to open a raw WebSocket channel (with optional sub-protocols and request headers) without taking a hard compile-time dependency on the WebSocket plugin. The GraphQL plugin uses this for graphql-transport-ws subscriptions.

public IInlineWebSocketChannel? FindWebSocketChannel()

Returns

IInlineWebSocketChannel

GetById(string)

public IBowireProtocol? GetById(string id)

Parameters

id string

Returns

IBowireProtocol

Register(IBowireProtocol)

public void Register(IBowireProtocol protocol)

Parameters

protocol IBowireProtocol