private static class HubTester.TestCallableClient extends ReplyCollector implements CallableClient
Modifier and Type | Field and Description |
---|---|
private HubConnection |
connection_ |
private int |
pingCount_ |
static Subscriptions |
SUBS |
Constructor and Description |
---|
TestCallableClient(HubConnection connection)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
private static Subscriptions |
getSubscriptions()
Returns the subscriptions object for this client.
|
private java.util.Map |
processCall(java.lang.String senderId,
Message msg)
Do the work of responding to a given SAMP message.
|
void |
receiveCall(java.lang.String senderId,
java.lang.String msgId,
Message msg)
Receives a message for which a response is required.
|
void |
receiveNotification(java.lang.String senderId,
Message msg)
Receives a message for which no response is required.
|
call, callAll, getReply, getReplyCount, receiveResponse, setAllowTagReuse, waitForReply
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
receiveResponse
private final HubConnection connection_
private int pingCount_
public static final Subscriptions SUBS
TestCallableClient(HubConnection connection)
connection
- hub connectionpublic void receiveNotification(java.lang.String senderId, Message msg)
CallableClient
receiveNotification
in interface CallableClient
senderId
- public ID of sending clientmsg
- messagepublic void receiveCall(java.lang.String senderId, java.lang.String msgId, Message msg) throws SampException
CallableClient
reply
method at some future point.receiveCall
in interface CallableClient
senderId
- public ID of sending clientmsgId
- message identifier for later use with replymsg
- messageSampException
private java.util.Map processCall(java.lang.String senderId, Message msg)
senderId
- sender public IDmsg
- message objectprivate static Subscriptions getSubscriptions()