Skip to content

Interface IBehaviorTopologyBuilder

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

Fluent builder for declaring behavior topology: pattern, transports, and feature options.

public interface IBehaviorTopologyBuilder

Declares this behavior as CQRS-shaped (command/query split, 200/202 HTTP semantics).

IBehaviorTopologyBuilder AsCqrs()

IBehaviorTopologyBuilder

Declares this behavior as direct (no architectural pattern — input → handler → output, 200/204 HTTP).

IBehaviorTopologyBuilder AsDirect()

IBehaviorTopologyBuilder

Declares this behavior as a durable execution workflow with event-store replay semantics.

IBehaviorTopologyBuilder AsDurableExecution()

IBehaviorTopologyBuilder

Declares this behavior as event-driven (fire-and-forget, 202 HTTP, fanout).

IBehaviorTopologyBuilder AsEventDriven()

IBehaviorTopologyBuilder

Declares this behavior as a process manager step (long-running, durable checkpoint).

IBehaviorTopologyBuilder AsProcessManager()

IBehaviorTopologyBuilder

Declares this behavior as a saga step (stateful, compensation chain).

IBehaviorTopologyBuilder AsSaga()

IBehaviorTopologyBuilder

Declares this behavior as a choreography-based saga step (event-reaction coordination).

IBehaviorTopologyBuilder AsSagaChoreography()

IBehaviorTopologyBuilder

Builds the final descriptor. Called internally by the engine — do not call directly.

BehaviorTopologyDescriptor Build(string behaviorId)

behaviorId string

BehaviorTopologyDescriptor

Requires one Cephalon feature flag to be enabled before the behavior can execute.

IBehaviorTopologyBuilder RequireFeatureFlag(string featureFlagId)

featureFlagId string

The feature-flag identifier that must resolve to enabled.

IBehaviorTopologyBuilder

The same builder for fluent chaining.

Requires all requested Cephalon feature flags to be enabled before the behavior can execute.

IBehaviorTopologyBuilder RequireFeatureFlags(params string[] featureFlagIds)

featureFlagIds string[]

The feature-flag identifiers that must resolve to enabled.

IBehaviorTopologyBuilder

The same builder for fluent chaining.

Adds the gRPC transport.

IBehaviorTopologyBuilder ViaGrpc()

IBehaviorTopologyBuilder

Adds the GraphQL over HTTP transport (queries and mutations).

IBehaviorTopologyBuilder ViaHttpGraphQl()

IBehaviorTopologyBuilder

Adds the GraphQL subscriptions via Server-Sent Events transport.

IBehaviorTopologyBuilder ViaHttpGraphQlSse()

IBehaviorTopologyBuilder

Adds the GraphQL subscriptions via WebSocket transport.

IBehaviorTopologyBuilder ViaHttpGraphQlWs()

IBehaviorTopologyBuilder

Adds the JSON-RPC 2.0 over HTTP transport.

IBehaviorTopologyBuilder ViaHttpJsonRpc()

IBehaviorTopologyBuilder

Adds the raw Server-Sent Events push transport.

IBehaviorTopologyBuilder ViaHttpSse()

IBehaviorTopologyBuilder

Adds the in-memory transport (zero-infra, for tests and local dev).

IBehaviorTopologyBuilder ViaInMemory()

IBehaviorTopologyBuilder

Adds the Kafka transport.

IBehaviorTopologyBuilder ViaKafka()

IBehaviorTopologyBuilder

Adds the RabbitMQ (AMQP) transport.

IBehaviorTopologyBuilder ViaRabbitMq()

IBehaviorTopologyBuilder

Adds the raw WebSocket bi-directional transport.

IBehaviorTopologyBuilder ViaWebSocket()

IBehaviorTopologyBuilder

Overrides the logical API surface projected by route-shaped transport adapters.

IBehaviorTopologyBuilder WithApiSurface(string groupPath, string operationPath)

groupPath string

operationPath string

IBehaviorTopologyBuilder

This primarily affects the shared generic behavior HTTP transport surface used by JSON-RPC, GraphQL, GraphQL-SSE, GraphQL-WS, Server-Sent Events, and WebSocket bindings. Public REST endpoints are module-owned and should be mapped through RestBehaviorModuleBase.ConfigureRestBehaviors(…), with MapAdditionalEndpoints(…) plus MapBehaviorRestGroup(…) reserved for the advanced manual-route escape hatch, instead of behavior topology.

Adds or replaces arbitrary topology metadata for companion packs that need extra routing or runtime hints.

IBehaviorTopologyBuilder WithMetadata(string key, string? value)

key string

The stable metadata key.

value string?

The metadata value. Pass null to remove the key from the topology descriptor.

IBehaviorTopologyBuilder

The same builder for fluent chaining.

WithOptions(Action<BehaviorTopologyOptions>)

Section titled “ WithOptions(Action<BehaviorTopologyOptions>)”

Configures optional feature flags for this behavior (outbox, inbox, event sourcing).

IBehaviorTopologyBuilder WithOptions(Action<BehaviorTopologyOptions> configure)

configure Action<BehaviorTopologyOptions>

IBehaviorTopologyBuilder