Table of Contents

Interface IMiddlewareClient

Namespace
Skyline.DataMiner.DataSources.CommunicationGatewayMiddleware.Common.Api
Assembly
Skyline.DataMiner.DataSources.CommunicationGatewayMiddleware.Common.dll

A class that represents a single gRPC connection that can be used to handle a particular gRPC service's communication. This requires the CommunicationGateway DxM to be available.

'Channel' refers to a virtual connection to a conceptual endpoint in the DxM. 'Connection' refers to an active gRPC (HTTP2) connection with an endpoint. 'DataSource' refers to a conceptual endpoint and its identifying parameters.

public interface IMiddlewareClient
Extension Methods

Properties

ChannelId

The channel ID helps identify the source when investigating logging and traces. It also makes the subjects to communicate over the message broker with unique.

ChannelName

The name assigned to this channel for users to identify it more easily than with the channel ID.

IsConnected

Gets a boolean indicating if there is a connection with the channel.

Logger

The logger instance that is wrapped so it will not throw exceptions.

WorkloadMonitor

Allows you to retrieve a snapshot of some workload-related information.

Methods

ChangeConfiguration(DataSourceConfiguration)

When the configuration is different, this will trigger a disconnect and update the data source configuration to then reconnect.

Connect()

Registers the channel with a CommunicationGateway DxM and makes the DxM attempt a connection with the endpoint.

Disconnect()

Closes the connection with the endpoint and unregisters the channel with the DxM.

Unsubscribe(string)

Removes a subscription from the endpoint.

Events

ConnectionStateChanged

Action that will be called when the connection state has changed.

SubscriptionDataCleared

Action that will be called when the subscription handlers have been cleared. This is expected to happen on a disconnect from the API, but not when the connection is lost and an attempt is made to reconnect automatically.

SubscriptionLost

Action that will be called when a subscription is lost and could not be recovered. The LostSubscriptionArgs will include details about the lost subscription.