C# Class SportingSolutions.Udapi.Sdk.StreamController

The StreamController is responsible for managing the connection to the RabbitMQ streaming server. There is only ONE streaming connection, independently of how many resources/consumers are added. Each consumer has its own queue, but the connection is shared among all the consumers. If the connection goes down, all the consumers get disconnected. There is no automatic re-connection. A connection is (re)-established when the first consumer is added. Once a connection is established the StreamSubscriber object is set to read from the connection for any up coming messages. The StreamSubscriber then passed this object to the IDispatch object whose task it to dispatch the messages to the correct consumer.
Inheritance: IDisposable
Afficher le fichier Open project: sportingsolutions/SS.Integration.UnifiedDataAPIClient.DotNet Class Usage Examples

Private Properties

Свойство Type Description
Connect void
StreamController System
StreamController System

Méthodes publiques

Méthode Description
AddConsumer ( IConsumer consumer, int echoInterval, int echoMaxDelay ) : void
Dispose ( ) : void
RemoveConsumer ( IConsumer consumer ) : void
Shutdown ( ) : void

Méthodes protégées

Méthode Description
AddConsumerToQueue ( IConsumer consumer ) : void
CloseConnection ( ) : void
EstablishConnection ( ConnectionFactory factory ) : void
OnConnectionShutdown ( object sender, RabbitMQ.Client.ShutdownEventArgs sea ) : void
OnConnectionStatusChanged ( ConnectionState newState ) : void
RemoveConsumerFromQueue ( IConsumer consumer ) : void

Private Methods

Méthode Description
Connect ( IConsumer consumer ) : void
StreamController ( ) : System
StreamController ( IDispatcher dispatcher ) : System

Method Details

AddConsumer() public méthode

public AddConsumer ( IConsumer consumer, int echoInterval, int echoMaxDelay ) : void
consumer IConsumer
echoInterval int
echoMaxDelay int
Résultat void

AddConsumerToQueue() protected méthode

protected AddConsumerToQueue ( IConsumer consumer ) : void
consumer IConsumer
Résultat void

CloseConnection() protected méthode

protected CloseConnection ( ) : void
Résultat void

Dispose() public méthode

public Dispose ( ) : void
Résultat void

EstablishConnection() protected méthode

protected EstablishConnection ( ConnectionFactory factory ) : void
factory RabbitMQ.Client.ConnectionFactory
Résultat void

OnConnectionShutdown() protected méthode

protected OnConnectionShutdown ( object sender, RabbitMQ.Client.ShutdownEventArgs sea ) : void
sender object
sea RabbitMQ.Client.ShutdownEventArgs
Résultat void

OnConnectionStatusChanged() protected méthode

protected OnConnectionStatusChanged ( ConnectionState newState ) : void
newState ConnectionState
Résultat void

RemoveConsumer() public méthode

public RemoveConsumer ( IConsumer consumer ) : void
consumer IConsumer
Résultat void

RemoveConsumerFromQueue() protected méthode

protected RemoveConsumerFromQueue ( IConsumer consumer ) : void
consumer IConsumer
Résultat void

Shutdown() public méthode

public Shutdown ( ) : void
Résultat void