StreamManagementService Class
The transmitter's half of the Event Stream Management API (SSF 1.0 Section 8.1): every operation from an authenticated receiver identity and a typed request to the ManagementResult<TBody> a host adapter renders. The store persists, the adapter transports and authenticates - the SSF semantics live here, once.
public sealed class StreamManagementServiceInheritance System.Object → StreamManagementService
Remarks
Echoed transmitter-supplied members are the one place this service is deliberately more lenient than SSF 1.0 Sections 8.1.1.3-8.1.1.4 permit: the typed update request carries the receiver-supplied members alone, so an echoed transmitter-supplied member never reaches the comparison the sections describe - it is dropped at binding, which the same sections allow for the MISSING case. A receiver echoing a stale value is thus tolerated rather than told 400.
Constructors
StreamManagementService(IStreamStore, IEventOutbox, EventDispatcher, SharedSignalsTransmitterOptions, ReceiverAddressPolicy, PollEndpointLocator, TimeProvider) Constructor
The transmitter's half of the Event Stream Management API (SSF 1.0 Section 8.1): every operation from an authenticated receiver identity and a typed request to the ManagementResult<TBody> a host adapter renders. The store persists, the adapter transports and authenticates - the SSF semantics live here, once.
public StreamManagementService(Abblix.SharedSignals.Transmitter.IStreamStore store, Abblix.SharedSignals.Transmitter.IEventOutbox outbox, Abblix.SharedSignals.Transmitter.EventDispatcher dispatcher, Abblix.SharedSignals.Transmitter.SharedSignalsTransmitterOptions options, Abblix.SharedSignals.Transmitter.ReceiverAddressPolicy addressPolicy, Abblix.SharedSignals.Transmitter.PollEndpointLocator pollEndpoints, System.TimeProvider? clock=null);Parameters
store IStreamStore
Where streams live.
outbox IEventOutbox
The per-stream queues, dropped with their stream.
dispatcher EventDispatcher
Mints and enqueues the framework's own signals.
options SharedSignalsTransmitterOptions
The deployment's one-time decisions.
addressPolicy ReceiverAddressPolicy
Judges the delivery address a receiver proposes. The same policy the sender consults, deliberately: an address refused at delivery is refused for a reason that was already true when the receiver named it, and answering 201 to a stream that can never be delivered to tells the receiver nothing it can act on - the refusal then lives only in the transmitter's log.
pollEndpoints PollEndpointLocator
Where a poll stream is polled - this transmitter's own address, and the one member of a stream's delivery it supplies rather than receives.
clock System.TimeProvider
Measures the verification throttle; null takes the system clock.
Remarks
Echoed transmitter-supplied members are the one place this service is deliberately more lenient than SSF 1.0 Sections 8.1.1.3-8.1.1.4 permit: the typed update request carries the receiver-supplied members alone, so an echoed transmitter-supplied member never reaches the comparison the sections describe - it is dropped at binding, which the same sections allow for the MISSING case. A receiver echoing a stale value is thus tolerated rather than told 400.
Methods
StreamManagementService.AddSubjectAsync(string, AddSubjectRequest, CancellationToken) Method
Adds a subject to a stream (SSF 1.0 Section 8.1.3.2). Success asserts nothing about the subject being known - the anti-probing posture of Section 9.1 by construction, since this service accepts any well-formed subject as a statement of interest.
public System.Threading.Tasks.Task<Abblix.SharedSignals.Transmitter.ManagementResult<object>> AddSubjectAsync(string receiverId, Abblix.SharedSignals.Model.AddSubjectRequest request, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken));Parameters
receiverId System.String
The authenticated receiver identity.
request AddSubjectRequest
The stream, the subject, and optionally whether it is verified; omitted means verified (Section 8.1.3.2).
cancellationToken System.Threading.CancellationToken
Cancels store I/O.
Returns
System.Threading.Tasks.Task<Abblix.SharedSignals.Transmitter.ManagementResult<System.Object>>
StreamManagementService.ChangeStreamStatusAsync(string, string, string, string, CancellationToken) Method
Changes a stream's status on the transmitter's OWN initiative - the door SSF 1.0 Section 8.1.5 governs, as opposed to the receiver-driven UpdateStreamStatusAsync(string, StreamStatus, CancellationToken). The stream-updated event escorts the change: for a pause or disable it is enqueued as a status announcement, the one kind of item delivery carries over a stopped stream, and for a disable the held queue is dropped FIRST so the announcement is not dropped with it.
public System.Threading.Tasks.Task<bool> ChangeStreamStatusAsync(string receiverId, string streamId, string status, string? reason=null, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken));Parameters
receiverId System.String
The receiver whose stream is being changed.
streamId System.String
The stream being changed.
status System.String
The new status, one of StreamStatuses.
reason System.String
Why the transmitter changed it, for the event and the status document.
cancellationToken System.Threading.CancellationToken
Cancels store I/O and the enqueue.
Returns
System.Threading.Tasks.Task<System.Boolean>
True when the stream was found and changed; false when no such stream exists,
or its status already was the requested one - a no-op announces nothing.
Exceptions
System.ArgumentException
The status value is not one of StreamStatuses: the caller here is the
transmitter's own code, so a bad value is a programming error, not wire input.
StreamManagementService.CreateStreamAsync(string, CreateStreamRequest, CancellationToken) Method
Creates a stream for the receiver (SSF 1.0 Section 8.1.1.1): the transmitter supplies identity, audience and the delivered-events intersection; the receiver's proposal supplies the rest.
public System.Threading.Tasks.Task<Abblix.SharedSignals.Transmitter.ManagementResult<Abblix.SharedSignals.Model.StreamConfiguration>> CreateStreamAsync(string receiverId, Abblix.SharedSignals.Model.CreateStreamRequest request, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken));Parameters
receiverId System.String
The authenticated receiver identity.
request CreateStreamRequest
The receiver-supplied half of the configuration.
cancellationToken System.Threading.CancellationToken
Cancels store I/O.
Returns
System.Threading.Tasks.Task<Abblix.SharedSignals.Transmitter.ManagementResult<StreamConfiguration>>
StreamManagementService.DeleteStreamAsync(string, string, CancellationToken) Method
Deletes a stream and drops its queue (SSF 1.0 Section 8.1.1.5).
public System.Threading.Tasks.Task<Abblix.SharedSignals.Transmitter.ManagementResult<object>> DeleteStreamAsync(string receiverId, string streamId, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken));Parameters
receiverId System.String
The authenticated receiver identity.
streamId System.String
The stream to delete.
cancellationToken System.Threading.CancellationToken
Cancels store I/O.
Returns
System.Threading.Tasks.Task<Abblix.SharedSignals.Transmitter.ManagementResult<System.Object>>
StreamManagementService.GetStreamAsync(string, string, CancellationToken) Method
Reads one stream's configuration (SSF 1.0 Section 8.1.1.2).
public System.Threading.Tasks.Task<Abblix.SharedSignals.Transmitter.ManagementResult<Abblix.SharedSignals.Model.StreamConfiguration>> GetStreamAsync(string receiverId, string streamId, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken));Parameters
receiverId System.String
The authenticated receiver identity.
streamId System.String
The stream to read.
cancellationToken System.Threading.CancellationToken
Cancels store I/O.
Returns
System.Threading.Tasks.Task<Abblix.SharedSignals.Transmitter.ManagementResult<StreamConfiguration>>
StreamManagementService.GetStreamStatusAsync(string, string, CancellationToken) Method
Reads a stream's status (SSF 1.0 Section 8.1.2.1).
public System.Threading.Tasks.Task<Abblix.SharedSignals.Transmitter.ManagementResult<Abblix.SharedSignals.Model.StreamStatus>> GetStreamStatusAsync(string receiverId, string streamId, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken));Parameters
receiverId System.String
The authenticated receiver identity.
streamId System.String
The stream whose status is being queried.
cancellationToken System.Threading.CancellationToken
Cancels store I/O.
Returns
System.Threading.Tasks.Task<Abblix.SharedSignals.Transmitter.ManagementResult<StreamStatus>>
StreamManagementService.ListStreamsAsync(string, CancellationToken) Method
Lists the receiver's streams (SSF 1.0 Section 8.1.1.2); the empty list is a receiver with no streams, never an error.
public System.Threading.Tasks.Task<Abblix.SharedSignals.Transmitter.ManagementResult<System.Collections.Generic.IReadOnlyList<Abblix.SharedSignals.Model.StreamConfiguration>>> ListStreamsAsync(string receiverId, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken));Parameters
receiverId System.String
The authenticated receiver identity.
cancellationToken System.Threading.CancellationToken
Cancels store I/O.
Returns
System.Threading.Tasks.Task<Abblix.SharedSignals.Transmitter.ManagementResult<System.Collections.Generic.IReadOnlyList<StreamConfiguration>>>
StreamManagementService.RemoveSubjectAsync(string, RemoveSubjectRequest, CancellationToken) Method
Removes a subject from a stream (SSF 1.0 Section 8.1.3.3). Removing what was never added still answers success: a 404 for an unrecognized subject is exactly the probing signal Section 9.1 warns about, and staying silent is the option it offers.
public System.Threading.Tasks.Task<Abblix.SharedSignals.Transmitter.ManagementResult<object>> RemoveSubjectAsync(string receiverId, Abblix.SharedSignals.Model.RemoveSubjectRequest request, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken));Parameters
receiverId System.String
The authenticated receiver identity.
request RemoveSubjectRequest
The stream and the subject.
cancellationToken System.Threading.CancellationToken
Cancels store I/O.
Returns
System.Threading.Tasks.Task<Abblix.SharedSignals.Transmitter.ManagementResult<System.Object>>
StreamManagementService.ReplaceStreamAsync(string, UpdateStreamRequest, CancellationToken) Method
Replaces a stream's receiver-supplied configuration whole: a member absent from the request is deleted (SSF 1.0 Section 8.1.1.4) - except the delivery, without which a stream cannot operate, so its absence is refused rather than read as deletion.
public System.Threading.Tasks.Task<Abblix.SharedSignals.Transmitter.ManagementResult<Abblix.SharedSignals.Model.StreamConfiguration>> ReplaceStreamAsync(string receiverId, Abblix.SharedSignals.Model.UpdateStreamRequest request, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken));Parameters
receiverId System.String
The authenticated receiver identity.
request UpdateStreamRequest
The stream identifier and the full receiver-supplied set.
cancellationToken System.Threading.CancellationToken
Cancels store I/O.
Returns
System.Threading.Tasks.Task<Abblix.SharedSignals.Transmitter.ManagementResult<StreamConfiguration>>
StreamManagementService.RequestVerificationAsync(string, VerificationRequest, CancellationToken) Method
Triggers a Verification Event over a stream (SSF 1.0 Section 8.1.4.2): the event is enqueued with the stream's own opaque identifier as its subject and the receiver's "state" echoed, and requests inside "min_verification_interval" are throttled.
public System.Threading.Tasks.Task<Abblix.SharedSignals.Transmitter.ManagementResult<object>> RequestVerificationAsync(string receiverId, Abblix.SharedSignals.Model.VerificationRequest request, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken));Parameters
receiverId System.String
The authenticated receiver identity.
request VerificationRequest
The stream and optionally the state to echo.
cancellationToken System.Threading.CancellationToken
Cancels store I/O and the enqueue.
Returns
System.Threading.Tasks.Task<Abblix.SharedSignals.Transmitter.ManagementResult<System.Object>>
StreamManagementService.UpdateStreamAsync(string, UpdateStreamRequest, CancellationToken) Method
Updates a stream: present receiver-supplied members change, absent ones stay (SSF 1.0 Section 8.1.1.3).
public System.Threading.Tasks.Task<Abblix.SharedSignals.Transmitter.ManagementResult<Abblix.SharedSignals.Model.StreamConfiguration>> UpdateStreamAsync(string receiverId, Abblix.SharedSignals.Model.UpdateStreamRequest request, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken));Parameters
receiverId System.String
The authenticated receiver identity.
request UpdateStreamRequest
The stream identifier and the members to change.
cancellationToken System.Threading.CancellationToken
Cancels store I/O.
Returns
System.Threading.Tasks.Task<Abblix.SharedSignals.Transmitter.ManagementResult<StreamConfiguration>>
StreamManagementService.UpdateStreamStatusAsync(string, StreamStatus, CancellationToken) Method
Updates a stream's status at the receiver's request (SSF 1.0 Section 8.1.2.2). A receiver-driven change sends no stream-updated event - Section 8.1.5 binds the transmitter's OWN changes only. Disabling drops the held queue: a disabled stream "will not hold any events" (Section 8.1.2.1).
public System.Threading.Tasks.Task<Abblix.SharedSignals.Transmitter.ManagementResult<Abblix.SharedSignals.Model.StreamStatus>> UpdateStreamStatusAsync(string receiverId, Abblix.SharedSignals.Model.StreamStatus request, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken));Parameters
receiverId System.String
The authenticated receiver identity.
request StreamStatus
The stream, the new status, and optionally why.
cancellationToken System.Threading.CancellationToken
Cancels store I/O.
Returns
System.Threading.Tasks.Task<Abblix.SharedSignals.Transmitter.ManagementResult<StreamStatus>>