C# Класс 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
Наследование: IDispatcher
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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

Приватные методы

Метод Описание
AddConnectionToConnections ( Connection connection ) : void
CreateConsumers ( IEnumerable connections ) : IEnumerable
Start ( ) : void

Описание методов

Dispatcher() публичный Метод

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.
Результат System

End() публичный Метод

Stop listening to messages
public End ( ) : System.Threading.Tasks.Task
Результат System.Threading.Tasks.Task

Open() публичный Метод

Opens the specified connection.
public Open ( Connection connection ) : void
connection Connection The connection.
Результат void

Open() публичный Метод

Opens the specified connection by name
public Open ( string connectionName ) : void
connectionName string The name of the connection
Результат void

Receive() публичный Метод

Begins listening for messages on channels, and dispatching them to request handlers.
public Receive ( ) : void
Результат void

Shut() публичный Метод

Shuts the specified connection.
public Shut ( Connection connection ) : void
connection Connection The connection.
Результат void

Shut() публичный Метод

Shuts the specified connection by name
public Shut ( string connectionName ) : void
connectionName string The name of the connection
Результат void