Class MessageTrackerHubConnector.MessageTrackerCallableClient

  • All Implemented Interfaces:
    CallableClient
    Enclosing class:
    MessageTrackerHubConnector

    private class MessageTrackerHubConnector.MessageTrackerCallableClient
    extends java.lang.Object
    implements CallableClient
    CallableClient wrapper class which intercepts calls to keep track of sent and received messages.
    • Method Detail

      • getSelfClient

        private Client getSelfClient()
        Returns a Client object for use in Transmission objects which represents this connection's owner.
        Returns:
        self client object
      • receiveCall

        public void receiveCall​(java.lang.String senderId,
                                java.lang.String msgId,
                                Message msg)
                         throws java.lang.Exception
        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
        msg - message
        Throws:
        java.lang.Exception
      • receiveNotification

        public void receiveNotification​(java.lang.String senderId,
                                        Message msg)
                                 throws java.lang.Exception
        Description copied from interface: CallableClient
        Receives a message for which no response is required.
        Specified by:
        receiveNotification in interface CallableClient
        Parameters:
        senderId - public ID of sending client
        msg - message
        Throws:
        java.lang.Exception
      • receiveResponse

        public void receiveResponse​(java.lang.String responderId,
                                    java.lang.String msgTag,
                                    Response response)
                             throws java.lang.Exception
        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
        msgTag - client-defined tag labelling previously-sent message
        response - returned response object
        Throws:
        java.lang.Exception