Class 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()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • NoCallableClient

        private NoCallableClient()
    • Method Detail

      • 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's reply method at some future point.
        Specified by:
        receiveCall in interface CallableClient
        Parameters:
        senderId - public ID of sending client
        msgId - message identifier for later use with reply
        message - 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 interface CallableClient
        Parameters:
        responderId - public ID of responding client
        msgId - client-defined tag labelling previously-sent message
        response - returned response object
        Throws:
        SampException