C# Class paramore.brighter.serviceactivator.Dispatcher

Class Dispatcher. The 'core' Service Activator class, the Dispatcher controls and co-ordinates the creation of readers from channels, and dispatching the commands and events translated from those messages to handlers. It controls the lifetime of the application through Receive and End and allows the stop and start of individual connections through Open and Shut
Inheritance: IDispatcher
Afficher le fichier Open project: iancooper/Paramore Class Usage Examples

Méthodes publiques

Méthode Description
Dispatcher ( IAmACommandProcessor commandProcessor, IAmAMessageMapperRegistry messageMapperRegistry, IEnumerable connections ) : System

Initializes a new instance of the Dispatcher class.

End ( ) : System.Threading.Tasks.Task

Stop listening to messages

Open ( Connection connection ) : void

Opens the specified connection.

Open ( string connectionName ) : void

Opens the specified connection by name

Receive ( ) : void

Begins listening for messages on channels, and dispatching them to request handlers.

Shut ( Connection connection ) : void

Shuts the specified connection.

Shut ( string connectionName ) : void

Shuts the specified connection by name

Private Methods

Méthode Description
AddConnectionToConnections ( Connection connection ) : void
CreateConsumers ( IEnumerable connections ) : IEnumerable
Start ( ) : void

Method Details

Dispatcher() public méthode

Initializes a new instance of the Dispatcher class.
public Dispatcher ( IAmACommandProcessor commandProcessor, IAmAMessageMapperRegistry messageMapperRegistry, IEnumerable connections ) : System
commandProcessor IAmACommandProcessor The command processor.
messageMapperRegistry IAmAMessageMapperRegistry The message mapper registry.
connections IEnumerable The connections.
Résultat System

End() public méthode

Stop listening to messages
public End ( ) : System.Threading.Tasks.Task
Résultat System.Threading.Tasks.Task

Open() public méthode

Opens the specified connection.
public Open ( Connection connection ) : void
connection Connection The connection.
Résultat void

Open() public méthode

Opens the specified connection by name
public Open ( string connectionName ) : void
connectionName string The name of the connection
Résultat void

Receive() public méthode

Begins listening for messages on channels, and dispatching them to request handlers.
public Receive ( ) : void
Résultat void

Shut() public méthode

Shuts the specified connection.
public Shut ( Connection connection ) : void
connection Connection The connection.
Résultat void

Shut() public méthode

Shuts the specified connection by name
public Shut ( string connectionName ) : void
connectionName string The name of the connection
Résultat void