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
-
Method Summary
Modifier and TypeMethodDescriptionvoid
dispatchMessages
(Collection classExtensions) Dispatches the messages.getRecipient
(String recipientName) Gets a recipient by its name.final Map
void
registerAndSendMessage
(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.void
registerRecipient
(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.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.
-
Constructor Details
-
MessageController
public MessageController()
-
-
Method Details
-
registerRecipient
Description copied from interface:IMessageController
Allows to register a recipient by its name.- Specified by:
registerRecipient
in interfaceIMessageController
- Parameters:
recipientName
- The system name of the recipient.
-
registerRecipient
Description copied from interface:IMessageController
Allows to register a specific recipient by its class.- Specified by:
registerRecipient
in interfaceIMessageController
- Parameters:
recipientName
- The system name of the recipient.recipientClass
- The class of the recipient.- Returns:
- An
Object
.
-
registerRecipientListener
Description copied from interface:IMessageController
Allows to register a recipient by its name.- Specified by:
registerRecipientListener
in interfaceIMessageController
- Parameters:
recipientName
- The system name of the recipient.recipientListener
- The recipient listener to treat theIMessage
.- Returns:
- An
Object
.
-
unregisterRecipient
Description copied from interface:IMessageController
Allows to unregister a recipient by its name.- Specified by:
unregisterRecipient
in interfaceIMessageController
- Parameters:
recipientName
- The system name of the recipient.
-
getRecipient
Description copied from interface:IMessageController
Gets a recipient by its name.- Specified by:
getRecipient
in interfaceIMessageController
- Parameters:
recipientName
- The system name of the recipient.- Returns:
- An
Object
.
-
dispatchMessages
Description copied from interface:IMessageController
Dispatches the messages.- Specified by:
dispatchMessages
in interfaceIMessageController
- Parameters:
classExtensions
-
-
sendMessage
Description copied from interface:IMessageController
Builds and sends a message to a specific recipient.- Specified by:
sendMessage
in 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:IMessageController
Registers a recipient, builds and sends a message.- Specified by:
registerAndSendMessage
in 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:IMessageController
Registers a specific recipient by passing its class, builds and sends a message.- Specified by:
registerAndSendMessage
in 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
.
-