Package org.astrogrid.samp.web
Class UrlTrackerHubConnection.UrlTrackerCallableClient
- java.lang.Object
-
- org.astrogrid.samp.web.UrlTrackerHubConnection.UrlTrackerCallableClient
-
- All Implemented Interfaces:
CallableClient
- Enclosing class:
- UrlTrackerHubConnection
private class UrlTrackerHubConnection.UrlTrackerCallableClient extends java.lang.Object implements CallableClient
CallableClient wrapper implementation which intercepts communications, scans the payloads for URLs, and informs an associated UrlTracker.
-
-
Field Summary
Fields Modifier and Type Field Description private CallableClient
baseCallable_
-
Constructor Summary
Constructors Constructor Description UrlTrackerCallableClient(CallableClient baseCallable)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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.void
receiveResponse(java.lang.String responderId, java.lang.String msgTag, Response response)
Receives a response to a message previously sent by this client.
-
-
-
Field Detail
-
baseCallable_
private final CallableClient baseCallable_
-
-
Constructor Detail
-
UrlTrackerCallableClient
UrlTrackerCallableClient(CallableClient baseCallable)
Constructor.- Parameters:
baseCallable
- object on which this one is based
-
-
Method Detail
-
receiveCall
public void receiveCall(java.lang.String senderId, java.lang.String msgId, Message msg) throws java.lang.Exception
Description copied from interface:CallableClient
Receives a message for which a response is required. The implementation must take care to call the hub'sreply
method at some future point.- Specified by:
receiveCall
in interfaceCallableClient
- Parameters:
senderId
- public ID of sending clientmsgId
- message identifier for later use with replymsg
- message- Throws:
java.lang.Exception
-
receiveNotification
public void receiveNotification(java.lang.String senderId, Message msg) throws java.lang.Exception
Description copied from interface:CallableClient
Receives a message for which no response is required.- Specified by:
receiveNotification
in interfaceCallableClient
- Parameters:
senderId
- public ID of sending clientmsg
- message- Throws:
java.lang.Exception
-
receiveResponse
public void receiveResponse(java.lang.String responderId, java.lang.String msgTag, Response response) throws java.lang.Exception
Description copied from interface:CallableClient
Receives a response to a message previously sent by this client.- Specified by:
receiveResponse
in interfaceCallableClient
- Parameters:
responderId
- public ID of responding clientmsgTag
- client-defined tag labelling previously-sent messageresponse
- returned response object- Throws:
java.lang.Exception
-
-