Package com.axemble.vdoc.sdk.messages
Class MessageController
java.lang.Object
com.axemble.vdoc.sdk.messages.MessageController
- All Implemented Interfaces:
IController,IMessageController,Serializable
- Author:
- vlygeros
- See Also:
-
Field Summary
Fields inherited from interface com.axemble.vdoc.sdk.interfaces.IMessageController
KEY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddispatchMessages(Collection classExtensions) Dispatches the messages.getRecipient(String recipientName) Gets a recipient by its name.final MapvoidregisterAndSendMessage(String recipientName, int eventType, Object body) Registers a recipient, builds and sends a message.registerAndSendMessage(String recipientName, Class recipientClass, int eventType, Object body) Registers a specific recipient by passing its class, builds and sends a message.voidregisterRecipient(String recipientName) Allows to register a recipient by its name.registerRecipient(String recipientName, Class recipientClass) Allows to register a specific recipient by its class.registerRecipientListener(String recipientName, IRecipientListener recipientListener) Allows to register a recipient by its name.voidsendMessage(String recipientName, int eventType, Object body) Builds and sends a message to a specific recipient.voidunregisterRecipient(String recipientName) Allows to unregister a recipient by its name.
-
Constructor Details
-
MessageController
public MessageController()
-
-
Method Details
-
registerRecipient
Description copied from interface:IMessageControllerAllows to register a recipient by its name.- Specified by:
registerRecipientin interfaceIMessageController- Parameters:
recipientName- The system name of the recipient.
-
registerRecipient
Description copied from interface:IMessageControllerAllows to register a specific recipient by its class.- Specified by:
registerRecipientin interfaceIMessageController- Parameters:
recipientName- The system name of the recipient.recipientClass- The class of the recipient.- Returns:
- An
Object.
-
registerRecipientListener
Description copied from interface:IMessageControllerAllows to register a recipient by its name.- Specified by:
registerRecipientListenerin interfaceIMessageController- Parameters:
recipientName- The system name of the recipient.recipientListener- The recipient listener to treat theIMessage.- Returns:
- An
Object.
-
unregisterRecipient
Description copied from interface:IMessageControllerAllows to unregister a recipient by its name.- Specified by:
unregisterRecipientin interfaceIMessageController- Parameters:
recipientName- The system name of the recipient.
-
getRecipient
Description copied from interface:IMessageControllerGets a recipient by its name.- Specified by:
getRecipientin interfaceIMessageController- Parameters:
recipientName- The system name of the recipient.- Returns:
- An
Object.
-
dispatchMessages
Description copied from interface:IMessageControllerDispatches the messages.- Specified by:
dispatchMessagesin interfaceIMessageController- Parameters:
classExtensions-
-
sendMessage
Description copied from interface:IMessageControllerBuilds and sends a message to a specific recipient.- Specified by:
sendMessagein interfaceIMessageController- Parameters:
recipientName- The system name of the recipient.eventType- The event type of the message.body- The body of the message.
-
getRecipients
- Returns:
- the recipients
-
registerAndSendMessage
Description copied from interface:IMessageControllerRegisters a recipient, builds and sends a message.- Specified by:
registerAndSendMessagein interfaceIMessageController- Parameters:
recipientName- The system name of the recipient.eventType- The event type of the message.body- The body of the message.
-
registerAndSendMessage
public Object registerAndSendMessage(String recipientName, Class recipientClass, int eventType, Object body) Description copied from interface:IMessageControllerRegisters a specific recipient by passing its class, builds and sends a message.- Specified by:
registerAndSendMessagein interfaceIMessageController- Parameters:
recipientName- The system name of the recipient.recipientClass- The recipient class.eventType- The event type of the message.body- The body of the message.- Returns:
- An
Object.
-