Skip to content

Latest commit

 

History

History
58 lines (42 loc) · 7.67 KB

File metadata and controls

58 lines (42 loc) · 7.67 KB

EventDispatcher Class

Namespace: Friflo.Json.Fliox.Hub.Host.Event
Assembly: Friflo.Json.Fliox.Hub

An EventDispatcher is used to enable Pub-Sub.

public sealed class EventDispatcher : IDisposable

Inheritance: object → EventDispatcher

Implements: IDisposable

Remarks

If assigned to EventDispatcher the FlioxHub send push events to clients for database changes and messages these clients have subscribed. In case of remote database connections are used to send push events to clients.

Constructors

Name Description
EventDispatcher(EventDispatching, SharedEnv)

Properties

Name Description
SendEventClientId
SendEventUserId
SendTargetClientId If true the target client id is set in EventMessage's sent to clientsBy sending the client id multiple FlioxClient's can use a single WebSocketClientHubto receive events.If false remote clients like SocketClientHub must be initialized with Single
SubscribedClientsCount exposed only for test assertions. EventDispatcher lives on Hub. If required its state (subscribed client) can be exposed by ClientHits

Methods

Name Description
DisableChangeAccumulation(EntityDatabase) Disable container change accumulation. See EnableChangeAccumulation(EntityDatabase)
Dispose()
EnableChangeAccumulation(EntityDatabase) Enable container change accumulation.Container changes - create, upsert, merge and delete - send as SyncEvent's tasks to subscribers are accumulated for the given database
QueuedEventsCount()
SendQueuedEvents() Send all queued events to all connected subscribers for an EventDispatcher initialized withQueue Method is not thread-safe. The method can be called from any thread.
SendRawEventMessage(ShortString, ShortString, RawEventMessage, ObjectWriter) method is thread safe
SendRawSyncEvent(ShortString, ShortString, RawSyncEvent, ObjectWriter) method is thread safe
StopDispatcher()
ToString()

Documentation generated by MdDocs