Package org.astrogrid.samp.web
Class WebHubConnection
- java.lang.Object
-
- org.astrogrid.samp.xmlrpc.XmlRpcHubConnection
-
- org.astrogrid.samp.web.WebHubConnection
-
- All Implemented Interfaces:
HubConnection
class WebHubConnection extends XmlRpcHubConnection
HubConnection implementation for the Web Profile.- Since:
- 3 Feb 2011
- Author:
- Mark Taylor
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static class
WebHubConnection.CallWorker
Thread that performs repeated long polls to pull callbacks from the hub and passes them on to this connection's CallableClient for execution.
-
Field Summary
Fields Modifier and Type Field Description private java.lang.String
appName_
private WebHubConnection.CallWorker
callWorker_
private java.lang.String
clientKey_
private static java.util.logging.Logger
logger_
-
Constructor Summary
Constructors Constructor Description WebHubConnection(SampXmlRpcClient xClient, java.util.Map securityMap)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object
getClientKey()
Returns an object which is used as the first argument of most XML-RPC calls to the hub.void
setCallable(CallableClient client)
Tells the hub how it can perform callbacks on the client by providing a CallableClient object.-
Methods inherited from class org.astrogrid.samp.xmlrpc.XmlRpcHubConnection
call, callAll, callAndWait, declareMetadata, declareSubscriptions, exec, finalize, getMetadata, getRegInfo, getRegisteredClients, getSubscribedClients, getSubscriptions, notify, notifyAll, ping, rawExec, reply, unregister
-
-
-
-
Field Detail
-
appName_
private final java.lang.String appName_
-
clientKey_
private final java.lang.String clientKey_
-
callWorker_
private WebHubConnection.CallWorker callWorker_
-
logger_
private static java.util.logging.Logger logger_
-
-
Constructor Detail
-
WebHubConnection
public WebHubConnection(SampXmlRpcClient xClient, java.util.Map securityMap) throws SampException
Constructor.- Parameters:
xClient
- XML-RPC clientsecurityMap
- security information mapappName
- client's declared name- Throws:
SampException
-
-
Method Detail
-
getClientKey
public java.lang.Object getClientKey()
Description copied from class:XmlRpcHubConnection
Returns an object which is used as the first argument of most XML-RPC calls to the hub.- Specified by:
getClientKey
in classXmlRpcHubConnection
- Returns:
- SAMP-friendly object to identify this client
-
setCallable
public void setCallable(CallableClient client) throws SampException
Description copied from interface:HubConnection
Tells the hub how it can perform callbacks on the client by providing a CallableClient object. This is required before the client can declare subscriptions or make asynchronous calls.- Parameters:
client
- callable client- Throws:
SampException
-
-