Class UniformCallActionManager


  • public abstract class UniformCallActionManager
    extends AbstractCallActionManager
    SendActionManager subclass which works with messages of a single MType, using the Aysnchronous Call/Response delivery pattern. Concrete subclasses need only implement createMessage().
    Since:
    11 Nov 2008
    Author:
    Mark Taylor
    • Field Detail

      • parent_

        private final java.awt.Component parent_
      • mtype_

        private final java.lang.String mtype_
      • sendType_

        private final java.lang.String sendType_
    • Constructor Detail

      • UniformCallActionManager

        public UniformCallActionManager​(java.awt.Component parent,
                                        GuiHubConnector connector,
                                        java.lang.String mtype,
                                        java.lang.String sendType)
        Constructor.
        Parameters:
        parent - parent component
        connector - hub connector
        mtype - MType for messages transmitted by this object's actions
        sendType - short string identifying the kind of thing being sent (used for action descriptions etc)
    • Method Detail

      • createMessage

        protected abstract java.util.Map createMessage()
                                                throws java.lang.Exception
        Generates the message which is sent to one or all clients by this object's actions.
        Returns:
        Message-like Map representing message to transmit
        Throws:
        java.lang.Exception
      • createSendMenu

        public javax.swing.JMenu createSendMenu()
        Returns a new targetted send menu with a title suitable for this object.
        Returns:
        new send menu
      • getSendAction

        public javax.swing.Action getSendAction​(Client client)
        Description copied from class: SendActionManager
        Returns an action which can perform a single-client send associated with this object. If it implements equals (and hashCode) intelligently there will be efficiency advantages. The enabled status of such actions will be managed by this object.
        Overrides:
        getSendAction in class AbstractCallActionManager
        Parameters:
        client - recipient client
        Returns:
        action which sends to the given client