This class is the heart of the notification system. It delegates message transport to instances of IMessageHandler based on configuration values for each MessageType. It hosts all timing needed to check for and retry failed messages. It maintains the message queues and archives.
More...
|
| MessageController () |
| Creates a new message controller. More...
|
|
void | Start () |
| Starts the message controller looking for pending notifications to deliver. More...
|
|
void | Stop () |
| Stops the message controller looking for pending notifications to deliver. More...
|
|
void | ServiceQueue (string queue) |
| Triggers the controller to service a specific queue. This keeps the message from having to wait until the sleep cycle ends to get the message moving, and is called from the Notify method just before completion. More...
|
|
|
static void | Notify (string queue, MessageType type, string subject, string body) |
| A well-known entry point for initiating message notification, this method enqueues the incoming data as a Message and triggers processing for it.
More...
|
|
static void | Notify (string queue, MessageType type, string subject, string body, Dictionary< string, object > propertyBag) |
| A well-known entry point for initiating message notification, this method enqueues the incoming data as a Message and triggers processing for it.
More...
|
|
static void | Configure (Messages.ConfigurationMessage msg) |
| Enqueues a configuration message. More...
|
|
|
virtual void | OnMessageControllerStatus (string status) |
| Wraps the event of the same name and allows subclasses to handle the event without wiring up a delegate. More...
|
|
|
static string | WellknownSystemQueue [get] |
| Gets the wellknown name (configurable) of the queue used for system status messages. More...
|
|
static string | WellknownConfigQueue [get] |
| Gets the wellknown name (configurable) of the queue used for configuration messages (which can add and remove queues). More...
|
|
This class is the heart of the notification system. It delegates message transport to instances of IMessageHandler based on configuration values for each MessageType. It hosts all timing needed to check for and retry failed messages. It maintains the message queues and archives.
This class does not use the schduler infrastucture because
-
It would create a circular reference with the scheduling assembly.
-
Scheduled tasks are not intended to repeatedly interrupted and restarted while this class will have a timing loop in it that is intended for that purpose.
◆ MessageController()
Apac.Messaging.MessageController.MessageController |
( |
| ) |
|
|
inline |
Creates a new message controller.
◆ Configure()
Enqueues a configuration message.
- Parameters
-
msg | The message to be sent. |
◆ Notify() [1/2]
static void Apac.Messaging.MessageController.Notify |
( |
string |
queue, |
|
|
MessageType |
type, |
|
|
string |
subject, |
|
|
string |
body |
|
) |
| |
|
inlinestatic |
A well-known entry point for initiating message notification, this method enqueues the incoming data as a Message and triggers processing for it.
While this is a well-known method, callers should invoke it through a delegate provided by the ServiceLocator interface. This will decouple callers from this method implementation in case it must be changed.
- Parameters
-
queue | The isolated partition to which the message is destined. This can be thought of as a customer within a bank's domain or an enterprise within an ASP's configuration domain. |
type | The type of content in the message. See MessageType. |
subject | A short summary of the message indicating its purpose. |
body | The content of the message. |
◆ Notify() [2/2]
static void Apac.Messaging.MessageController.Notify |
( |
string |
queue, |
|
|
MessageType |
type, |
|
|
string |
subject, |
|
|
string |
body, |
|
|
Dictionary< string, object > |
propertyBag |
|
) |
| |
|
inlinestatic |
A well-known entry point for initiating message notification, this method enqueues the incoming data as a Message and triggers processing for it.
While this is a well-known method, callers should invoke it through a delegate provided by the ServiceLocator interface. This will decouple callers from this method implementation in case it must be changed.
- Parameters
-
queue | The isolated partition to which the message is destined. This can be thought of as a customer within a bank's domain or an enterprise within an ASP's configuration domain. |
type | The type of content in the message. See MessageType. |
subject | A short summary of the message indicating its purpose. |
body | The content of the message. |
propertyBag | The set of extended data elements to be tagged along with the message, through the messaging system. This data does not become part of the delivered message for standard message handlers. Objects in the property bag must support serialization and/or XML serialization, preferrably both. If the system is configured to serialize in a format not supported by the objects in the property bag, then they will be lost. |
◆ OnMessageControllerStatus()
virtual void Apac.Messaging.MessageController.OnMessageControllerStatus |
( |
string |
status | ) |
|
|
inlineprotectedvirtual |
Wraps the event of the same name and allows subclasses to handle the event without wiring up a delegate.
- Parameters
-
status | The status message to report. |
◆ ServiceQueue()
void Apac.Messaging.MessageController.ServiceQueue |
( |
string |
queue | ) |
|
|
inline |
Triggers the controller to service a specific queue. This keeps the message from having to wait until the sleep cycle ends to get the message moving, and is called from the Notify method just before completion.
- Parameters
-
queue | The name of the queue to be services. |
◆ Start()
void Apac.Messaging.MessageController.Start |
( |
| ) |
|
|
inline |
Starts the message controller looking for pending notifications to deliver.
◆ Stop()
void Apac.Messaging.MessageController.Stop |
( |
| ) |
|
|
inline |
Stops the message controller looking for pending notifications to deliver.
◆ MessageControllerStatus
A simple event for reporting status from within the controller.
◆ WellknownConfigQueue
string Apac.Messaging.MessageController.WellknownConfigQueue |
|
staticget |
Gets the wellknown name (configurable) of the queue used for configuration messages (which can add and remove queues).
◆ WellknownSystemQueue
string Apac.Messaging.MessageController.WellknownSystemQueue |
|
staticget |
Gets the wellknown name (configurable) of the queue used for system status messages.
The documentation for this class was generated from the following file:
- /var/lib/jenkins/workspace/apac/APAC/APACCore/Messaging/MessageController.cs