Package org.astrogrid.samp.hub
Class HubClient.NoCallableClient
- java.lang.Object
-
- org.astrogrid.samp.hub.HubClient.NoCallableClient
-
- All Implemented Interfaces:
CallableClient
- Enclosing class:
- HubClient
private class HubClient.NoCallableClient extends java.lang.Object implements CallableClient
No-op callback handler implementation. Any attempt to call its methods results in an exception.
-
-
Constructor Summary
Constructors Modifier Constructor Description private
NoCallableClient()
-
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 msgId, Response response)
Receives a response to a message previously sent by this client.private void
refuse()
-
-
-
Method Detail
-
receiveNotification
public void receiveNotification(java.lang.String senderId, Message message) throws SampException
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- Throws:
SampException
-
receiveCall
public void receiveCall(java.lang.String senderId, java.lang.String msgId, Message message) throws SampException
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- Throws:
SampException
-
receiveResponse
public void receiveResponse(java.lang.String responderId, java.lang.String msgId, Response response) throws SampException
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 clientmsgId
- client-defined tag labelling previously-sent messageresponse
- returned response object- Throws:
SampException
-
refuse
private void refuse() throws SampException
- Throws:
SampException
-
-