public class MessageController extends Object implements IMessageController
KEY
Constructor and Description |
---|
MessageController() |
Modifier and Type | Method and Description |
---|---|
void |
dispatchMessages(Collection classExtensions)
Dispatches the messages.
|
Object |
getRecipient(String recipientName)
Gets a recipient by its name.
|
Map |
getRecipients() |
Object |
registerAndSendMessage(String recipientName,
Class recipientClass,
int eventType,
Object body)
Registers a specific recipient by passing its class, builds and sends a message.
|
void |
registerAndSendMessage(String recipientName,
int eventType,
Object body)
Registers a recipient, builds and sends a message.
|
void |
registerRecipient(String recipientName)
Allows to register a recipient by its name.
|
Object |
registerRecipient(String recipientName,
Class recipientClass)
Allows to register a specific recipient by its class.
|
Object |
registerRecipientListener(String recipientName,
IRecipientListener recipientListener)
Allows to register a recipient by its name.
|
void |
sendMessage(String recipientName,
int eventType,
Object body)
Builds and sends a message to a specific recipient.
|
void |
unregisterRecipient(String recipientName)
Allows to unregister a recipient by its name.
|
public void registerRecipient(String recipientName)
IMessageController
registerRecipient
in interface IMessageController
recipientName
- The system name of the recipient.public Object registerRecipient(String recipientName, Class recipientClass)
IMessageController
registerRecipient
in interface IMessageController
recipientName
- The system name of the recipient.recipientClass
- The class of the recipient.Object
.public Object registerRecipientListener(String recipientName, IRecipientListener recipientListener)
IMessageController
registerRecipientListener
in interface IMessageController
recipientName
- The system name of the recipient.recipientListener
- The recipient listener to treat the IMessage
.Object
.public void unregisterRecipient(String recipientName)
IMessageController
unregisterRecipient
in interface IMessageController
recipientName
- The system name of the recipient.public Object getRecipient(String recipientName)
IMessageController
getRecipient
in interface IMessageController
recipientName
- The system name of the recipient.Object
.public void dispatchMessages(Collection classExtensions)
IMessageController
dispatchMessages
in interface IMessageController
public void sendMessage(String recipientName, int eventType, Object body)
IMessageController
sendMessage
in interface IMessageController
recipientName
- The system name of the recipient.eventType
- The event type of the message.body
- The body of the message.public final Map getRecipients()
public void registerAndSendMessage(String recipientName, int eventType, Object body)
IMessageController
registerAndSendMessage
in interface IMessageController
recipientName
- The system name of the recipient.eventType
- The event type of the message.body
- The body of the message.public Object registerAndSendMessage(String recipientName, Class recipientClass, int eventType, Object body)
IMessageController
registerAndSendMessage
in interface IMessageController
recipientName
- The system name of the recipient.recipientClass
- The recipient class.eventType
- The event type of the message.body
- The body of the message.Object
.Copyright © 2022 Visiativ. All rights reserved.