public class SampSender extends Object
It does a similar job to its predecessor
SendManager
,
which it cannibalises,
but unlike that class it provides support for synchronous message
sending (call/callAll), with result strings handed back to the
calling code rather than just discarded or pushed through the
logging system.
Constructor and Description |
---|
SampSender(String mtype)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
Outcome |
activateMessage(Map<?,?> message)
Invoked to perform an activation action which involves sending
a SAMP message to this sender's currently selected target client(s).
|
ListModel<org.astrogrid.samp.Client> |
getClientListModel()
Returns a list of the clients that are current possible targets
for this sender's messages (subscribed to the relevant MType).
|
ComboBoxModel<Object> |
getClientSelectionModel()
Returns a ComboBoxModel listing clients that are subscribed to
this sender's MType.
|
org.astrogrid.samp.gui.GuiHubConnector |
getConnector()
Returns this sender's hub connector.
|
String |
getMType()
Returns the MType of the message that this sender will send.
|
TopcatSampControl |
getSampControl()
Returns this sender's Samp control.
|
String |
getUnavailableText()
Returns a message explaining why this sender can't do any useful
work at the moment.
|
boolean |
hasClients()
Indicates whether any registered clients are subscribed to
this sender's MType.
|
boolean |
isAvailable()
Indicates whether this sender has a chance of working.
|
public SampSender(String mtype)
mtype
- message type to which this sender is sensitivepublic String getMType()
public boolean isAvailable()
public ListModel<org.astrogrid.samp.Client> getClientListModel()
public boolean hasClients()
public ComboBoxModel<Object> getClientSelectionModel()
public TopcatSampControl getSampControl()
public org.astrogrid.samp.gui.GuiHubConnector getConnector()
public Outcome activateMessage(Map<?,?> message)
message
- message to sendpublic String getUnavailableText()
Copyright © 2003-2025 CCLRC: Council for the Central Laboratory of the Research Councils. All Rights Reserved.