public abstract class NotifyActionManager extends SendActionManager
| Modifier and Type | Class and Description |
|---|---|
private class |
NotifyActionManager.SendAction
Action which performs a send.
|
| Modifier and Type | Field and Description |
|---|---|
private GuiHubConnector |
connector_ |
private static java.util.logging.Logger |
logger_ |
private java.awt.Component |
parent_ |
private java.lang.String |
sendType_ |
BROADCAST_TARGET, subscribedClientModel_| Constructor and Description |
|---|
NotifyActionManager(java.awt.Component parent,
GuiHubConnector connector,
java.lang.String mtype,
java.lang.String sendType)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected javax.swing.Action |
createBroadcastAction()
Returns a new action for broadcast associated with this object.
|
protected abstract java.util.Map |
createMessage()
Generates the message which is sent to one or all clients
by this object's actions.
|
javax.swing.JMenu |
createSendMenu()
Returns a new menu for targetted sends with a title suitable for
this object.
|
protected javax.swing.Action |
getSendAction(Client client)
Returns an action which can perform a single-client send associated
with this object.
|
protected void |
messageSent(HubConnection connection,
Message msg,
Client[] recipients)
Called when a message has been sent by this object.
|
createSendMenu, createTargetAction, createTargetSelector, dispose, disposeSendMenu, getBroadcastAction, getBroadcastIcon, getClientListModel, getConnector, getSendIcon, setEnabled, updateStateprivate final java.awt.Component parent_
private final GuiHubConnector connector_
private final java.lang.String sendType_
private static final java.util.logging.Logger logger_
public NotifyActionManager(java.awt.Component parent,
GuiHubConnector connector,
java.lang.String mtype,
java.lang.String sendType)
parent - parent componentconnector - hub connectormtype - MType for messages transmitted by this object's actionssendType - short string identifying the kind of thing being
sent (used for action descriptions etc)protected abstract java.util.Map createMessage()
throws java.lang.Exception
Message-like Map representing
message to transmitjava.lang.Exceptionprotected void messageSent(HubConnection connection, Message msg, Client[] recipients)
connection - connection objectmsg - the message which was sentrecipients - the recipients to whom an attempt was made to send
the messageprotected javax.swing.Action createBroadcastAction()
SendActionManagercreateBroadcastAction in class SendActionManagerpublic javax.swing.JMenu createSendMenu()
protected javax.swing.Action getSendAction(Client client)
SendActionManagerequals
(and hashCode) intelligently there will be efficiency
advantages.
The enabled status of such actions will be managed by this object.getSendAction in class SendActionManagerclient - recipient client