Package org.astrogrid.samp.client
Class HubConnector.ConnectorCallableClient
- java.lang.Object
-
- org.astrogrid.samp.client.HubConnector.ConnectorCallableClient
-
- All Implemented Interfaces:
CallableClient
- Enclosing class:
- HubConnector
private class HubConnector.ConnectorCallableClient extends java.lang.Object implements CallableClient
CallableClient implementation used by this class.
-
-
Field Summary
Fields Modifier and Type Field Description private HubConnection
conn_
-
Constructor Summary
Constructors Modifier Constructor Description private
ConnectorCallableClient()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
receiveCall(java.lang.String senderId, java.lang.String msgId, Message message)
Receives a message for which a response is required.void
receiveNotification(java.lang.String senderId, Message message)
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.private void
setConnection(HubConnection connection)
Sets the currently active hub connection.
-
-
-
Field Detail
-
conn_
private HubConnection conn_
-
-
Method Detail
-
setConnection
private void setConnection(HubConnection connection)
Sets the currently active hub connection.- Parameters:
connection
- connection
-
receiveNotification
public void receiveNotification(java.lang.String senderId, Message message)
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 clientmessage
- message
-
receiveCall
public void receiveCall(java.lang.String senderId, java.lang.String msgId, Message message)
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 replymessage
- message
-
receiveResponse
public void receiveResponse(java.lang.String responderId, java.lang.String msgTag, Response response)
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
-
-