Interface MessageHandler

    • Method Detail

      • getSubscriptions

        java.util.Map getSubscriptions()
        Returns a Subscriptions map corresponding to the messages handled by this object. Only messages with MTypes which match the keys of this map will be passed to this object.
        Returns:
        Subscriptions-like map
      • receiveNotification

        void receiveNotification​(HubConnection connection,
                                 java.lang.String senderId,
                                 Message message)
                          throws java.lang.Exception
        Processes a message which does not require a response.
        Parameters:
        connection - hub connection
        senderId - public ID of client which sent the message
        message - message
        Throws:
        java.lang.Exception
      • receiveCall

        void receiveCall​(HubConnection connection,
                         java.lang.String senderId,
                         java.lang.String msgId,
                         Message message)
                  throws java.lang.Exception
        Processes a message which does require a response. Implementations should make sure that a subsequent call to connection.reply() is made using the supplied msgId.
        Parameters:
        connection - hub connection
        senderId - public ID of client which sent the message
        msgId - message ID
        message - message
        Throws:
        java.lang.Exception