# Interface ISubscribersService

Namespace
  adas_core.Application.Services.Interfaces

Assembly
  adas-core.Application.dll

    public interface ISubscribersService

Extension Methods
  NumberUtils.IsNumber(object)
  NumberUtils.ToDouble(object)
  ObjectUtils.ToStr(object?)

## Methods

### AddSubscriber(WsSubscriber)

Registers the specified WebSocket subscriber to receive notifications or messages.

    void AddSubscriber(WsSubscriber subscriber)

#### Parameters

`subscriber` WsSubscriber

  The WsSubscriber instance to be added to the collection of subscribers.

### GetById(string)

Retrieves a WsSubscriber associated with the specified context connection identifier.

    WsSubscriber? GetById(string contextConnectionId)

#### Parameters

`contextConnectionId` string

  The unique identifier of the context connection used to look up the subscriber.

#### Returns

WsSubscriber

  The WsSubscriber matching the given connection identifier, or `null` if no subscriber is found.

### GetByPocId(ObjectId)

Retrieves the list of subscribers associated with the specified point of contact (POC) identifier.

    List<WsSubscriber> GetByPocId(ObjectId pocId)

#### Parameters

`pocId` ObjectId

  The identifier of the point of contact whose subscribers should be returned.

#### Returns

List<WsSubscriber>

  A list of WsSubscriber instances matching the provided POC identifier.

### GetSubscribers()

Retrieves the list of subscribers.

    List<WsSubscriber> GetSubscribers()

#### Returns

List<WsSubscriber>

  A list of WsSubscriber instances representing the subscribers.

### RemoveConnectionById(string)

Removes a connection identified by the specified context connection identifier.

    int RemoveConnectionById(string contextConnectionId)

#### Parameters

`contextConnectionId` string

  The unique identifier of the connection to remove.

#### Returns

int

  An integer indicating the result of the removal operation.