public class MessageTrackerHubService extends GuiHubService
MAX_TIMEOUT, MAX_WAITERS
Constructor and Description |
---|
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.
|
Modifier and Type | Method and Description |
---|---|
HubClient |
createClient(String publicId,
ProfileToken ptoken)
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.
|
ListSelectionModel |
getClientSelectionModel()
Returns the selection model corresponding to this service's client
list model.
|
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.
|
createHubWindow, createMenus, declareMetadata, declareSubscriptions, getClientListModel
call, callAll, callAndWait, createConnection, createHubMessageHandlers, disconnect, disconnectAll, getClientSet, getIdComparator, getMetadata, getRegisteredClients, getServiceConnection, getSubscribedClients, getSubscriptions, isHubRunning, notify, notifyAll, register, setCallable, shutdown, unregister
public MessageTrackerHubService(Random random)
random
- random number generatorpublic 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)public void start()
HubService
HubService.register(org.astrogrid.samp.hub.ProfileToken)
method should not be
called until the hub has been started.start
in interface HubService
start
in class GuiHubService
public ClientSet createClientSet()
BasicHubService
createClientSet
in class GuiHubService
public HubClient createClient(String publicId, ProfileToken ptoken)
BasicHubService
createClient
in class BasicHubService
publicId
- client public IDptoken
- connection sourcepublic JComponent createHubPanel()
GuiHubService
createHubPanel
in class GuiHubService
public ListSelectionModel getClientSelectionModel()
GuiHubService
getClientSelectionModel
in class GuiHubService
public ListModel getTxListModel(Client client)
Transmission
objects.client
- client owned by this hub servicepublic ListModel getRxListModel(Client client)
Transmission
objects.client
- client owned by this hub serviceprotected void reply(HubClient caller, String msgId, Map response) throws SampException
BasicHubService
reply
method of connections
registered with this service.reply
in class BasicHubService
caller
- calling clientmsgId
- message IDresponse
- response to forwardSampException
HubConnection.reply(java.lang.String, java.util.Map)
Copyright © 2008–2024. All rights reserved.