Class HubTester.TestCallableClient

    • Constructor Detail

      • TestCallableClient

        TestCallableClient​(HubConnection connection)
        Constructor.
        Parameters:
        connection - hub connection
    • Method Detail

      • receiveNotification

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

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

        private java.util.Map processCall​(java.lang.String senderId,
                                          Message msg)
        Do the work of responding to a given SAMP message.
        Parameters:
        senderId - sender public ID
        msg - message object
        Returns:
        content of the successful reply's samp.result entry
      • getSubscriptions

        private static Subscriptions getSubscriptions()
        Returns the subscriptions object for this client.
        Returns:
        subscriptions