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 privateNoCallableClient()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidreceiveCall(java.lang.String senderId, java.lang.String msgId, Message message)Receives a message for which a response is required.voidreceiveNotification(java.lang.String senderId, Message message)Receives a message for which no response is required.voidreceiveResponse(java.lang.String responderId, java.lang.String msgId, Response response)Receives a response to a message previously sent by this client.private voidrefuse()
-
-
-
Method Detail
-
receiveNotification
public void receiveNotification(java.lang.String senderId, Message message) throws SampExceptionDescription copied from interface:CallableClientReceives a message for which no response is required.- Specified by:
receiveNotificationin 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 SampExceptionDescription copied from interface:CallableClientReceives a message for which a response is required. The implementation must take care to call the hub'sreplymethod at some future point.- Specified by:
receiveCallin 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 SampExceptionDescription copied from interface:CallableClientReceives a response to a message previously sent by this client.- Specified by:
receiveResponsein 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
-
-