Skip to content

IPluginEvents

Interface in Oadm.Sdk.Plugins · Oadm.Sdk.dll

Pushes live events from a core plugin to every client page watching it (gRPC PluginService.Watch). Fire and forget: IPluginEvents.Publish never blocks and never throws for slow or missing watchers; a watcher that falls behind loses the oldest events (pages re-read their state through InvokeAsync after reconnecting). Throttle high-rate sources in the plugin (e.g. batch log lines every 500 ms).

public interface IPluginEvents

Guide: Core plugins and pages

void Publish(string topic, string? payloadJson)

Sends an event to every page that watches; never blocks. topic is yours (“status”, “rows”).

void Publish(string topic, string? payloadJson, PluginEventAudience audience)

Default implementation

Sends an event to the watchers audience covers (SDK 0.4.0): an event about devices reaches only users who can see them. On OADM 4.5 and later IPluginEvents.Publish reaches only watchers with all devices. The default (older hosts, which have no device groups) is IPluginEvents.Publish.

const int MaxPayloadLength = 1048576

Largest payload a single event may carry (UTF-16 characters); larger events are dropped and logged.