Class MessageController

java.lang.Object
com.axemble.vdoc.sdk.messages.MessageController
All Implemented Interfaces:
IController, IMessageController, Serializable

public class MessageController extends Object implements IMessageController
Author:
vlygeros
See Also:
  • Constructor Details

    • MessageController

      public MessageController()
  • Method Details

    • registerRecipient

      public void registerRecipient(String recipientName)
      Description copied from interface: IMessageController
      Allows to register a recipient by its name.
      Specified by:
      registerRecipient in interface IMessageController
      Parameters:
      recipientName - The system name of the recipient.
    • registerRecipient

      public Object registerRecipient(String recipientName, Class recipientClass)
      Description copied from interface: IMessageController
      Allows to register a specific recipient by its class.
      Specified by:
      registerRecipient in interface IMessageController
      Parameters:
      recipientName - The system name of the recipient.
      recipientClass - The class of the recipient.
      Returns:
      An Object.
    • registerRecipientListener

      public Object registerRecipientListener(String recipientName, IRecipientListener recipientListener)
      Description copied from interface: IMessageController
      Allows to register a recipient by its name.
      Specified by:
      registerRecipientListener in interface IMessageController
      Parameters:
      recipientName - The system name of the recipient.
      recipientListener - The recipient listener to treat the IMessage.
      Returns:
      An Object.
    • unregisterRecipient

      public void unregisterRecipient(String recipientName)
      Description copied from interface: IMessageController
      Allows to unregister a recipient by its name.
      Specified by:
      unregisterRecipient in interface IMessageController
      Parameters:
      recipientName - The system name of the recipient.
    • getRecipient

      public Object getRecipient(String recipientName)
      Description copied from interface: IMessageController
      Gets a recipient by its name.
      Specified by:
      getRecipient in interface IMessageController
      Parameters:
      recipientName - The system name of the recipient.
      Returns:
      An Object.
    • dispatchMessages

      public void dispatchMessages(Collection classExtensions)
      Description copied from interface: IMessageController
      Dispatches the messages.
      Specified by:
      dispatchMessages in interface IMessageController
      Parameters:
      classExtensions -
    • sendMessage

      public void sendMessage(String recipientName, int eventType, Object body)
      Description copied from interface: IMessageController
      Builds and sends a message to a specific recipient.
      Specified by:
      sendMessage in interface IMessageController
      Parameters:
      recipientName - The system name of the recipient.
      eventType - The event type of the message.
      body - The body of the message.
    • getRecipients

      public final Map getRecipients()
      Returns:
      the recipients
    • registerAndSendMessage

      public void registerAndSendMessage(String recipientName, int eventType, Object body)
      Description copied from interface: IMessageController
      Registers a recipient, builds and sends a message.
      Specified by:
      registerAndSendMessage in interface IMessageController
      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 interface IMessageController
      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.