Package org.astrogrid.samp.client
Interface ResponseHandler
-
public interface ResponseHandler
Interface for a client which wishes to receive responses to message it has sent asynchrnonously usingcall
orcallAll
.- Since:
- 16 Jul 2008
- Author:
- Mark Taylor
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
ownsTag(java.lang.String msgTag)
Indicates whether this handler will process the response with a given message tag.void
receiveResponse(HubConnection connection, java.lang.String responderId, java.lang.String msgTag, Response response)
Processes a response to an earlier message.
-
-
-
Method Detail
-
ownsTag
boolean ownsTag(java.lang.String msgTag)
Indicates whether this handler will process the response with a given message tag.- Parameters:
msgTag
- tag with which earlier call was labelled- Returns:
- true iff this handler wants to process the response labelled
with
msgTag
-
receiveResponse
void receiveResponse(HubConnection connection, java.lang.String responderId, java.lang.String msgTag, Response response) throws java.lang.Exception
Processes a response to an earlier message. Will only be called formsgTag
values which returntrue
fromownsTag(java.lang.String)
.- Parameters:
connection
- hub connectionresponderId
- client id of client sending responsemsgTag
- message tag from previous callresponse
- response object- Throws:
java.lang.Exception
-
-