Class NotificationClient
- Namespace
- SmarterLink.Clients
- Assembly
- SmarterLink.Clients.dll
Provides event subscription for a SmarterLink participant. Obtain an instance via Notifications on any role client.
public sealed class NotificationClient
- Inheritance
-
NotificationClient
- Inherited Members
Methods
RegisterCatchAllStandardEventHandler(ProtocolDataPayloadHandler<ProtocolDataPayloadBase>)
Registers a handler that receives all standard SmarterLink event types. Useful for logging, auditing, or forwarding all messages regardless of type.
public void RegisterCatchAllStandardEventHandler(Delegates.ProtocolDataPayloadHandler<ProtocolDataPayloadBase> handler)
Parameters
RegisterCustomPayloadHandler(string, CustomProtocolDataPayloadHandler)
Registers a handler for custom (application-defined) payloads matching the given topic filter.
Custom payloads bypass the standard typed event model: they use the standard protocol envelope
but carry an arbitrary JSON payload and a caller-defined payloadType name.
The handler receives the full MQTT topic, the protocol header (including PayloadType and
UserData), and the raw payload string.
public void RegisterCustomPayloadHandler(string topicFilter, Delegates.CustomProtocolDataPayloadHandler handler)
Parameters
topicFilterstringAn MQTT topic filter (supports
+and#wildcards).handlerDelegates.CustomProtocolDataPayloadHandlerThe handler to invoke when a matching message arrives.
RegisterDataProcessorEventHandler<TEvent>(ProtocolDataPayloadHandler<TEvent>, ParticipantId?)
Registers a handler for a specific Data Processor event type.
Optionally scoped to a specific processor by participantId;
omit to receive from all processors.
public void RegisterDataProcessorEventHandler<TEvent>(Delegates.ProtocolDataPayloadHandler<TEvent> handler, ParticipantId? participantId = null) where TEvent : DataProcessorEvents
Parameters
handlerDelegates.ProtocolDataPayloadHandler<TEvent>participantIdParticipantId
Type Parameters
TEvent
RegisterInspectionEventHandler<TEvent>(ProtocolDataPayloadHandler<TEvent>, ParticipantId?)
Registers a handler for a specific inspection (Data Producer) event type.
Optionally scoped to a specific producer by participantId;
omit to receive from all producers.
public void RegisterInspectionEventHandler<TEvent>(Delegates.ProtocolDataPayloadHandler<TEvent> handler, ParticipantId? participantId = null) where TEvent : InspectionEvents
Parameters
handlerDelegates.ProtocolDataPayloadHandler<TEvent>participantIdParticipantId
Type Parameters
TEvent
RegisterJobEventHandler<TEvent>(ProtocolDataPayloadHandler<TEvent>)
Registers a handler for a specific job event type at the configured station.
public void RegisterJobEventHandler<TEvent>(Delegates.ProtocolDataPayloadHandler<TEvent> handler) where TEvent : JobEvents
Parameters
handlerDelegates.ProtocolDataPayloadHandler<TEvent>
Type Parameters
TEvent