org.astrogrid.samp.client.CallableClientpublic class ClientRegWatcher
extends java.lang.Object
implements org.astrogrid.samp.client.CallableClient
| Constructor | Description |
|---|---|
ClientRegWatcher(org.astrogrid.samp.client.HubConnection connection) |
Constructor.
|
| Modifier and Type | Method | Description |
|---|---|---|
java.lang.String |
getIdFromName(java.lang.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(java.lang.String senderId,
java.lang.String msgId,
org.astrogrid.samp.Message msg) |
|
void |
receiveNotification(java.lang.String senderId,
org.astrogrid.samp.Message msg) |
|
void |
receiveResponse(java.lang.String responderId,
java.lang.String msgTag,
org.astrogrid.samp.Response response) |
|
java.lang.String |
waitForIdFromName(java.lang.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(java.lang.String msgTag) |
Blocks until a response with a given tag is received, then returns
that response.
|
public ClientRegWatcher(org.astrogrid.samp.client.HubConnection connection)
connection - hub connectionpublic org.astrogrid.samp.Subscriptions getSubscriptions()
public java.lang.String waitForIdFromName(java.lang.String name,
long waitMillis)
name - client name soughtwaitMillis - maximum number of milliseconds to waitname,
or null if timeout is exceededpublic java.lang.String getIdFromName(java.lang.String name)
name - client namename,
or null if none is currently registeredpublic org.astrogrid.samp.Response waitForResponse(java.lang.String msgTag)
msgTag - message tagpublic void receiveCall(java.lang.String senderId,
java.lang.String msgId,
org.astrogrid.samp.Message msg)
throws org.astrogrid.samp.client.SampException
receiveCall in interface org.astrogrid.samp.client.CallableClientorg.astrogrid.samp.client.SampExceptionpublic void receiveNotification(java.lang.String senderId,
org.astrogrid.samp.Message msg)
receiveNotification in interface org.astrogrid.samp.client.CallableClientpublic void receiveResponse(java.lang.String responderId,
java.lang.String msgTag,
org.astrogrid.samp.Response response)
receiveResponse in interface org.astrogrid.samp.client.CallableClientCopyright © 2018 Central Laboratory of the Research Councils. All Rights Reserved.