|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.astrogrid.samp.hub.BasicHubService
org.astrogrid.samp.gui.GuiHubService
org.astrogrid.samp.gui.MessageTrackerHubService
public class MessageTrackerHubService
GuiHubService subclass which additionally keeps track of which messages have been sent and received, and can provide a graphical display of these. The overhead in maintaining the GUI display can be significant if there is high volume of message traffic.
| Field Summary |
|---|
| Fields inherited from class org.astrogrid.samp.hub.BasicHubService |
|---|
MAX_TIMEOUT, MAX_WAITERS |
| Constructor Summary | |
|---|---|
MessageTrackerHubService(Random random)
Constructs a hub service with default message tracker GUI expiry times. |
|
MessageTrackerHubService(Random random,
int listRemoveDelay,
int tableRemoveDelay,
int tableMaxRows)
Constructs a hub service with specified message tracker GUI expiry times. |
|
| Method Summary | |
|---|---|
HubClient |
createClient(String publicId)
Factory method used to create all the client objects which will be used by this hub service. |
ClientSet |
createClientSet()
Factory method used to create the client set used by this hub service. |
JComponent |
createHubPanel()
Creates a new component containing a display of the current hub internal state. |
ListModel |
getRxListModel(Client client)
Returns a ListModel representing the pending messages received by a given client. |
ListModel |
getTxListModel(Client client)
Returns a ListModel representing the pending messages sent from a given client. |
protected void |
reply(HubClient caller,
String msgId,
Map response)
Does the work for the reply method of connections
registered with this service. |
void |
start()
Begin operation. |
| Methods inherited from class org.astrogrid.samp.gui.GuiHubService |
|---|
createHubWindow, declareMetadata, declareSubscriptions, getClientListModel |
| Methods inherited from class org.astrogrid.samp.hub.BasicHubService |
|---|
call, callAll, callAndWait, createConnection, disconnect, getClientSet, getIdComparator, getMetadata, getRegisteredClients, getServiceConnection, getSubscribedClients, getSubscriptions, isHubRunning, notify, notifyAll, register, setCallable, shutdown, unregister |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MessageTrackerHubService(Random random)
random - random number generator
public MessageTrackerHubService(Random random,
int listRemoveDelay,
int tableRemoveDelay,
int tableMaxRows)
random - random number generatorlistRemoveDelay - expiry delay for summary icons in client
list displaytableRemoveDelay - expiry delay for rows in message
table displaytableMaxRows - maximum number of rows in message table
(beyond this limit resolved messages may be
removed early)| Method Detail |
|---|
public void start()
HubServiceHubService.register() method should not be
called until the hub has been started.
start in interface HubServicestart in class GuiHubServicepublic ClientSet createClientSet()
BasicHubService
createClientSet in class GuiHubServicepublic HubClient createClient(String publicId)
BasicHubService
createClient in class BasicHubServicepublicId - client public ID
public JComponent createHubPanel()
GuiHubService
createHubPanel in class GuiHubServicepublic ListModel getTxListModel(Client client)
Transmission objects.
client - client owned by this hub service
public ListModel getRxListModel(Client client)
Transmission objects.
client - client owned by this hub service
protected void reply(HubClient caller,
String msgId,
Map response)
throws SampException
BasicHubServicereply method of connections
registered with this service.
reply in class BasicHubServicecaller - calling clientmsgId - message IDresponse - response to forward
SampExceptionHubConnection.reply(java.lang.String, java.util.Map)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||