Skip to content

Interface IHttpBehaviorBinding

Namespace: Cephalon.Behaviors.Http.Abstractions
Assembly: Cephalon.Behaviors.Http.dll

Thin adapter that maps a behavior topology to one HTTP transport. Each transport variant (JSON-RPC, GraphQL, GraphQL-SSE, GraphQL-WS, SSE, WebSocket, etc.) implements this interface and is registered in the .

public interface IHttpBehaviorBinding

Gets the canonical transport identifier, e.g. http.jsonrpc.

string TransportId { get; }

string

MapAsync(WebApplication, BehaviorTopologyDescriptor, BehaviorDispatcher)

Section titled “ MapAsync(WebApplication, BehaviorTopologyDescriptor, BehaviorDispatcher)”

Maps the behavior’s routes/endpoints onto the . Called at most once per descriptor per transport (lazy-init guards ensure this).

Task MapAsync(WebApplication app, BehaviorTopologyDescriptor descriptor, BehaviorDispatcher dispatcher)

app WebApplication

The web application to register routes on.

descriptor BehaviorTopologyDescriptor

The behavior topology descriptor.

dispatcher BehaviorDispatcher

The behavior dispatcher to invoke.

Task

A task that completes when all routes are mapped.