|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectuk.ac.starlink.ttools.mode.ClientRegWatcher
public class ClientRegWatcher
Callable client implementation which can watch for registration of a given named application.
Constructor Summary | |
---|---|
ClientRegWatcher(org.astrogrid.samp.client.HubConnection connection)
Constructor. |
Method Summary | |
---|---|
String |
getIdFromName(String name)
Returns the client ID of a client with a given name if one is registered. |
org.astrogrid.samp.Subscriptions |
getSubscriptions()
Returns the subscriptions object indicating the MTypes this client can handle. |
void |
receiveCall(String senderId,
String msgId,
org.astrogrid.samp.Message msg)
|
void |
receiveNotification(String senderId,
org.astrogrid.samp.Message msg)
|
void |
receiveResponse(String responderId,
String msgTag,
org.astrogrid.samp.Response response)
|
String |
waitForIdFromName(String name,
long waitMillis)
Blocks until a client with a given name is regstered, and then returns its client ID. |
org.astrogrid.samp.Response |
waitForResponse(String msgTag)
Blocks until a response with a given tag is received, then returns that response. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ClientRegWatcher(org.astrogrid.samp.client.HubConnection connection)
connection
- hub connectionMethod Detail |
---|
public org.astrogrid.samp.Subscriptions getSubscriptions()
public String waitForIdFromName(String name, long waitMillis)
name
- client name soughtwaitMillis
- maximum number of milliseconds to wait
name
,
or null if timeout is exceededpublic String getIdFromName(String name)
name
- client name
name
,
or null if none is currently registeredpublic org.astrogrid.samp.Response waitForResponse(String msgTag)
msgTag
- message tag
public void receiveCall(String senderId, String msgId, org.astrogrid.samp.Message msg) throws org.astrogrid.samp.client.SampException
receiveCall
in interface org.astrogrid.samp.client.CallableClient
org.astrogrid.samp.client.SampException
public void receiveNotification(String senderId, org.astrogrid.samp.Message msg)
receiveNotification
in interface org.astrogrid.samp.client.CallableClient
public void receiveResponse(String responderId, String msgTag, org.astrogrid.samp.Response response)
receiveResponse
in interface org.astrogrid.samp.client.CallableClient
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |