private class ProxyManager.ProxyCallableClient extends java.lang.Object implements CallableClient
Modifier and Type | Field and Description |
---|---|
private java.lang.String |
localClientId_ |
private ProxyManager |
localManager_ |
private ProxyManager |
remoteManager_ |
private HubConnection |
remoteProxy_ |
Constructor and Description |
---|
ProxyCallableClient(Client localClient,
HubConnection remoteProxy,
ProxyManager remoteManager)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
private HubConnection |
getLocalProxy(java.lang.String remoteClientId)
Returns the hub connection for the proxy on the local hub
which corresponds to a given remote client.
|
private void |
proxyProcessMessage(java.lang.String remoteSenderId,
Message msg)
Performs housekeeping tasks for an incoming message if any.
|
void |
receiveCall(java.lang.String remoteSenderId,
java.lang.String remoteMsgId,
Message msg)
Receives a message for which a response is required.
|
void |
receiveNotification(java.lang.String remoteSenderId,
Message msg)
Receives a message for which no response is required.
|
void |
receiveResponse(java.lang.String remoteResponderId,
java.lang.String remoteMsgTag,
Response response)
Receives a response to a message previously sent by this client.
|
private final java.lang.String localClientId_
private final HubConnection remoteProxy_
private final ProxyManager remoteManager_
private final ProxyManager localManager_
ProxyCallableClient(Client localClient, HubConnection remoteProxy, ProxyManager remoteManager)
localClient
- local clientremoteProxy
- hub connection to the remote hub for the proxyremoteManager
- remote ProxyManager associated with the
hub where this proxy is connectedpublic void receiveNotification(java.lang.String remoteSenderId, Message msg) throws SampException
CallableClient
receiveNotification
in interface CallableClient
remoteSenderId
- public ID of sending clientmsg
- messageSampException
public void receiveCall(java.lang.String remoteSenderId, java.lang.String remoteMsgId, Message msg) throws SampException
CallableClient
reply
method at some future point.receiveCall
in interface CallableClient
remoteSenderId
- public ID of sending clientremoteMsgId
- message identifier for later use with replymsg
- messageSampException
public void receiveResponse(java.lang.String remoteResponderId, java.lang.String remoteMsgTag, Response response) throws SampException
CallableClient
receiveResponse
in interface CallableClient
remoteResponderId
- public ID of responding clientremoteMsgTag
- client-defined tag labelling previously-sent messageresponse
- returned response objectSampException
private HubConnection getLocalProxy(java.lang.String remoteClientId)
remoteClientId
- client ID of remote clientprivate void proxyProcessMessage(java.lang.String remoteSenderId, Message msg)
remoteSenderId
- id of sending client on remote hubmsg
- message