Package org.astrogrid.samp.xmlrpc
Class StandardHubConnection
- java.lang.Object
-
- org.astrogrid.samp.xmlrpc.XmlRpcHubConnection
-
- org.astrogrid.samp.xmlrpc.StandardHubConnection
-
- All Implemented Interfaces:
HubConnection
class StandardHubConnection extends XmlRpcHubConnection
HubConnection implementation for the Standard Profile.- Since:
- 27 Oct 2010
- Author:
- Mark Taylor
-
-
Field Summary
Fields Modifier and Type Field Description private CallableClientServer
callableServer_
private java.lang.String
clientKey_
private SampXmlRpcServerFactory
serverFactory_
-
Constructor Summary
Constructors Constructor Description StandardHubConnection(SampXmlRpcClient xClient, SampXmlRpcServerFactory serverFactory, java.lang.String secret)
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 callable)
Tells the hub how it can perform callbacks on the client by providing a CallableClient object.void
unregister()
Unregisters the client and terminates this connection.-
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
-
-
-
-
Field Detail
-
serverFactory_
private final SampXmlRpcServerFactory serverFactory_
-
clientKey_
private final java.lang.String clientKey_
-
callableServer_
private CallableClientServer callableServer_
-
-
Constructor Detail
-
StandardHubConnection
public StandardHubConnection(SampXmlRpcClient xClient, SampXmlRpcServerFactory serverFactory, java.lang.String secret) throws SampException
Constructor.- Parameters:
xClient
- XML-RPC clientserverFactory
- XML-RPC server factory implementationsecret
- samp.secret registration password- 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 callable) 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:
callable
- callable client- Throws:
SampException
-
unregister
public void unregister() throws SampException
Description copied from interface:HubConnection
Unregisters the client and terminates this connection.- Specified by:
unregister
in interfaceHubConnection
- Overrides:
unregister
in classXmlRpcHubConnection
- Throws:
SampException
-
-