Class ClientObservableSSE<T>
- Namespace
- Cratis.Arc.Queries
- Assembly
- Cratis.Arc.Core.dll
Represents an implementation of IClientObservable that uses Server-Sent Events (SSE) for streaming.
public class ClientObservableSSE<T> : ClientObservableBase<T>, IClientObservable, IAsyncEnumerable<T>
Type Parameters
TType of data being observed.
- Inheritance
-
ClientObservableSSE<T>
- Implements
- Inherited Members
- Extension Methods
Remarks
Initializes a new instance of the ClientObservableSSE<T> class.
Constructors
ClientObservableSSE(QueryContext, ISubject<T>, IReadModelInterceptors, IHttpRequestContextAccessor, IOptions<ArcOptions>, IHostApplicationLifetime, IObservableQueryEmissionGuards, ILogger<ClientObservableSSE<T>>)
Represents an implementation of IClientObservable that uses Server-Sent Events (SSE) for streaming.
public ClientObservableSSE(QueryContext queryContext, ISubject<T> subject, IReadModelInterceptors readModelInterceptors, IHttpRequestContextAccessor httpRequestContextAccessor, IOptions<ArcOptions> arcOptions, IHostApplicationLifetime hostApplicationLifetime, IObservableQueryEmissionGuards emissionGuards, ILogger<ClientObservableSSE<T>> logger)
Parameters
queryContextQueryContextThe QueryContext the observable is for.
subjectISubject<T>The System.Reactive.Subjects.ISubject<T> the observable wraps.
readModelInterceptorsIReadModelInterceptorsThe IReadModelInterceptors for intercepting read models.
httpRequestContextAccessorIHttpRequestContextAccessorThe IHttpRequestContextAccessor restored around each emission so tenant resolution sees the subscribing connection, not whatever ambient context the emitting thread happens to carry.
arcOptionsIOptions<ArcOptions>The ArcOptions.
hostApplicationLifetimeIHostApplicationLifetimeemissionGuardsIObservableQueryEmissionGuardsThe IObservableQueryEmissionGuards consulted per emission when an application opts in with an IGuardObservableQueryEmission.
loggerILogger<ClientObservableSSE<T>>The ILogger.
Remarks
Initializes a new instance of the ClientObservableSSE<T> class.
Methods
HandleConnectionCore(IHttpRequestContext)
Transport-specific connection handling implemented by each derived class.
protected override Task HandleConnectionCore(IHttpRequestContext context)
Parameters
contextIHttpRequestContextThe IHttpRequestContext for this connection.