private class MessageTrackerHubConnector.MessageTrackerHubConnection extends WrapperHubConnection
| Modifier and Type | Field and Description |
|---|---|
private Client |
selfClient_ |
| Constructor and Description |
|---|
MessageTrackerHubConnection(HubConnection base)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
call(java.lang.String recipientId,
java.lang.String msgTag,
java.util.Map msg)
Sends a message to a given client expecting a response.
|
java.util.Map |
callAll(java.lang.String msgTag,
java.util.Map msg)
Sends a message to all subscribed clients expecting responses.
|
Response |
callAndWait(java.lang.String recipientId,
java.util.Map msg,
int timeout)
Sends a message synchronously to a client, waiting for the response.
|
(package private) Client |
getSelfClient()
Returns a Client object for use in Transmission objects
which represents this connection's owner.
|
void |
notify(java.lang.String recipientId,
java.util.Map msg)
Sends a message to a given client without wanting a response.
|
java.util.List |
notifyAll(java.util.Map msg)
Sends a message to all subscribed clients without wanting a response.
|
void |
reply(java.lang.String msgId,
java.util.Map response)
Supplies a response to a previously received message.
|
void |
setCallable(CallableClient callable)
Tells the hub how it can perform callbacks on the client by providing
a CallableClient object.
|
declareMetadata, declareSubscriptions, getMetadata, getRegInfo, getRegisteredClients, getSubscribedClients, getSubscriptions, ping, unregisterprivate Client selfClient_
MessageTrackerHubConnection(HubConnection base)
base - connection on which this one is basedClient getSelfClient()
public void notify(java.lang.String recipientId,
java.util.Map msg)
throws SampException
HubConnectionnotify in interface HubConnectionnotify in class WrapperHubConnectionrecipientId - public-id of client to receive messagemsg - Message-like mapSampExceptionpublic java.util.List notifyAll(java.util.Map msg)
throws SampException
HubConnectionnotifyAll in interface HubConnectionnotifyAll in class WrapperHubConnectionmsg - Message-like mapSampExceptionpublic java.lang.String call(java.lang.String recipientId,
java.lang.String msgTag,
java.util.Map msg)
throws SampException
HubConnectionreceiveResponse method of this connection's
CallableClient will be called with a
response at some time in the future.
Only permitted if this client is already callable.
call in interface HubConnectioncall in class WrapperHubConnectionrecipientId - public-id of client to receive messagemsgTag - arbitrary string tagging this message for caller's
benefitmsg - Message-like mapSampExceptionpublic java.util.Map callAll(java.lang.String msgTag,
java.util.Map msg)
throws SampException
HubConnectionreceiveResponse method of this connection's
CallableClient will be called with responses at some
time in the future.
Only permitted if this client is already callable.
callAll in interface HubConnectioncallAll in class WrapperHubConnectionmsgTag - arbitrary string tagging this message for caller's
benefitmsg - Message-like mapSampExceptionpublic Response callAndWait(java.lang.String recipientId, java.util.Map msg, int timeout) throws SampException
HubConnectiontimeout
parameter, an exception will result.callAndWait in interface HubConnectioncallAndWait in class WrapperHubConnectionrecipientId - public-id of client to receive messagemsg - Message-like maptimeout - timeout in seconds, or <0 for no timeoutSampExceptionpublic void reply(java.lang.String msgId,
java.util.Map response)
throws SampException
HubConnectionreply in interface HubConnectionreply in class WrapperHubConnectionmsgId - ID associated with earlier sendresponse - Response-like mapSampExceptionpublic void setCallable(CallableClient callable) throws SampException
HubConnectionsetCallable in interface HubConnectionsetCallable in class WrapperHubConnectioncallable - callable clientSampException