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 CallableClientServercallableServer_private java.lang.StringclientKey_private SampXmlRpcServerFactoryserverFactory_
-
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.ObjectgetClientKey()Returns an object which is used as the first argument of most XML-RPC calls to the hub.voidsetCallable(CallableClient callable)Tells the hub how it can perform callbacks on the client by providing a CallableClient object.voidunregister()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:XmlRpcHubConnectionReturns an object which is used as the first argument of most XML-RPC calls to the hub.- Specified by:
getClientKeyin classXmlRpcHubConnection- Returns:
- SAMP-friendly object to identify this client
-
setCallable
public void setCallable(CallableClient callable) throws SampException
Description copied from interface:HubConnectionTells 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 SampExceptionDescription copied from interface:HubConnectionUnregisters the client and terminates this connection.- Specified by:
unregisterin interfaceHubConnection- Overrides:
unregisterin classXmlRpcHubConnection- Throws:
SampException
-
-