# Class NotifierService OptimaJet.Workflow.RealTimeTrackingPlugin.Notifiers.NotifierService The notifier service. Namespace: [OptimaJet.Workflow.RealTimeTrackingPlugin.Notifiers](https://api.workflowengine.io/realtime-tracking-plugin/OptimaJet.Workflow.RealTimeTrackingPlugin.Notifiers/) ```csharp public class NotifierService ``` ## Constructors `public NotifierService(IHubContext hubContext)` Initializes a new instance of the [NotifierService](https://api.workflowengine.io/realtime-tracking-plugin/OptimaJet.Workflow.RealTimeTrackingPlugin.Notifiers/NotifierService/) class. ### Parameters | Name | Type | Description | | --- | --- | --- | | `hubContext` | `IHubContext` | An instance of the SignalR.IHubContext?text=IHubContext. | ## Properties `public bool IsNotifierSet { get; }` A read-only property that returns `true` if the notifier is set, otherwise `false`. `public BaseNotifier? Notifier { get; }` A read-only property that returns the current notifier instance, or `null` if none is set. ## Methods `public void SetNotifier(BaseNotifier notifier)` Sets the notifier. ### Parameters | Name | Type | Description | | --- | --- | --- | | `notifier` | `BaseNotifier` | An instance of [BaseNotifier](https://api.workflowengine.io/realtime-tracking-plugin/OptimaJet.Workflow.RealTimeTrackingPlugin.Notifiers/BaseNotifier/) class. | `public void ClearNotifier()` Clears the notifier. `public Task OnConnectedAsync(string processId, string connectionId)` Method to handle client connection to a process for tracking purposes. ### Parameters | Name | Type | Description | | --- | --- | --- | | `processId` | `String` | ProcessId of the ProcessInstance. | | `connectionId` | `String` | The unique identifier of the client's connection. | ### Returns | Type | Description | | --- | --- | | `Task` | | `public Task OnDisconnectedAsync(string connectionId)` Handles the disconnection of a connection. ### Parameters | Name | Type | Description | | --- | --- | --- | | `connectionId` | `String` | The unique identifier for the connection. | ### Returns | Type | Description | | --- | --- | | `Task` | | `public Task StartAsync()` Starts the plugin. ### Returns | Type | Description | | --- | --- | | `Task` | | `public Task StopAsync()` Stops the plugin. ### Returns | Type | Description | | --- | --- | | `Task` | | [Previous MultiServerNotifier](https://api.workflowengine.io/realtime-tracking-plugin/OptimaJet.Workflow.RealTimeTrackingPlugin.Notifiers/MultiServerNotifier/) [Next SingleServerNotifier](https://api.workflowengine.io/realtime-tracking-plugin/OptimaJet.Workflow.RealTimeTrackingPlugin.Notifiers/SingleServerNotifier/)