private static class ClientXmlRpcHandler.ClientActorImpl extends java.lang.Object implements ClientActor
ClientActor
interface which does the
work for this class.
The correct CallableClient is determined from the private key,
and the work is then delegated to it.Modifier and Type | Field and Description |
---|---|
private java.util.Map |
entryMap_ |
Modifier | Constructor and Description |
---|---|
private |
ClientActorImpl() |
Modifier and Type | Method and Description |
---|---|
private ClientXmlRpcHandler.Entry |
getEntry(java.lang.String privateKey)
Returns the CallableClient corresponding to a given private key.
|
void |
receiveCall(java.lang.String privateKey,
java.lang.String senderId,
java.lang.String msgId,
java.util.Map msg)
Receives a message for which a response is required.
|
void |
receiveNotification(java.lang.String privateKey,
java.lang.String senderId,
java.util.Map msg)
Receives a message for which no response is required.
|
void |
receiveResponse(java.lang.String privateKey,
java.lang.String responderId,
java.lang.String msgTag,
java.util.Map resp)
Receives a response to a message previously sent by this client.
|
public void receiveNotification(java.lang.String privateKey, java.lang.String senderId, java.util.Map msg)
ClientActor
receiveNotification
in interface ClientActor
privateKey
- private key for hub-client communicationsenderId
- public ID of sending clientmsg
- messagepublic void receiveCall(java.lang.String privateKey, java.lang.String senderId, java.lang.String msgId, java.util.Map msg) throws java.lang.Exception
ClientActor
reply
method at some future point.receiveCall
in interface ClientActor
privateKey
- private key for hub-client communicationsenderId
- public ID of sending clientmsgId
- message identifier for later use with replymsg
- messagejava.lang.Exception
public void receiveResponse(java.lang.String privateKey, java.lang.String responderId, java.lang.String msgTag, java.util.Map resp) throws java.lang.Exception
ClientActor
receiveResponse
in interface ClientActor
privateKey
- private key for hub-client communicationresponderId
- public ID of responding clientmsgTag
- client-defined tag labelling previously-sent messageresp
- returned response objectjava.lang.Exception
private ClientXmlRpcHandler.Entry getEntry(java.lang.String privateKey)
privateKey
- private key for clientjava.lang.IllegalStateException
- if privateKey
is unknown