Package org.astrogrid.samp.gui
Class IndividualCallActionManager
java.lang.Object
org.astrogrid.samp.gui.SendActionManager
org.astrogrid.samp.gui.AbstractCallActionManager
org.astrogrid.samp.gui.IndividualCallActionManager
SendActionManager which uses the Asynchronous Call/Response delivery
pattern, but allows a "broadcast" to send different message objects
to different recipients.
Multiple targetted sends rather than an actual SAMP broadcast may be
used to achieve this.
Concrete subclasses need only implement the
createMessage(org.astrogrid.samp.Client)
method.
They may also wish to to customise the returned Send and Broadcast Action
objects (for instance give them useful names and descriptions).- Since:
- 3 Dec 2008
- Author:
- Mark Taylor
-
Field Summary
Fields inherited from class org.astrogrid.samp.gui.SendActionManager
BROADCAST_TARGET
-
Constructor Summary
ConstructorsConstructorDescriptionIndividualCallActionManager
(Component parent, GuiHubConnector connector, ListModel clientListModel) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionMust be implemented by concrete subclasses.protected abstract Map
createMessage
(Client client) Returns the Message object which is to be transmitted by this manager to a given client.Methods inherited from class org.astrogrid.samp.gui.AbstractCallActionManager
createResultHandler, createTag, dispose, getSendAction, registerHandler
Methods inherited from class org.astrogrid.samp.gui.SendActionManager
createSendMenu, createTargetAction, createTargetSelector, disposeSendMenu, getBroadcastAction, getBroadcastIcon, getClientListModel, getConnector, getSendIcon, setEnabled, updateState
-
Constructor Details
-
IndividualCallActionManager
public IndividualCallActionManager(Component parent, GuiHubConnector connector, ListModel clientListModel) Constructor.- Parameters:
parent
- parent componentconnector
- hub connectorclientListModel
- list model containing only those clients which are suitable recipients; all elements must beClient
s
-
-
Method Details
-
createMessage
Description copied from class:AbstractCallActionManager
Returns the Message object which is to be transmitted by this manager to a given client. This is called by the action returned byAbstractCallActionManager.getSendAction(org.astrogrid.samp.Client)
.- Specified by:
createMessage
in classAbstractCallActionManager
- Parameters:
client
- target- Returns:
- message
- Throws:
Exception
-
createBroadcastAction
Description copied from class:AbstractCallActionManager
Must be implemented by concrete subclasses.- Specified by:
createBroadcastAction
in classAbstractCallActionManager
- Returns:
- broadcast action; may be null if broadcast is not required
-