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
파일 보기 프로젝트 열기: iancooper/Paramore 1 사용 예제들

공개 메소드들

메소드 설명
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