Interface OutgoingMessageInspector<O extends OutgoingMessage>

    • Method Detail

      • isRateLimited

        boolean isRateLimited​(O message)
        Determines whether the current message should be request rate-limited
        Parameters:
        message - The OutgoingMessage representing the message to be inspected.
        Returns:
        True if the passed OutgoingMessage must be rate-limited. Otherwise false.
        Throws:
        IllegalArgumentException - The message is a null reference or the type of the message is not correct
      • getEventRequestRateLimitCount

        int getEventRequestRateLimitCount​(O message)
        Gets the number of events contained by the passed OutgoingMessage that must be rate-limited.
        Parameters:
        message - The OutgoingMessage representing the message to be inspected.
        Returns:
        the number of events contained by the passed OutgoingMessage that must be rate-limited.
        Throws:
        IllegalArgumentException - The message is a null reference or the type of the message is not correct
      • isRateLimited

        boolean isRateLimited​(String message)
        Determines whether the current message representation should be request rate-limited
        Parameters:
        message - The string representation of the message
        Returns:
        True if the passed message should be rate limited. Otherwise false.
        Throws:
        IllegalArgumentException - The message is a null reference
      • getEventRequestRateLimitCount

        int getEventRequestRateLimitCount​(String message)
        Gets the number of events contained by the passed string representation of the message.
        Parameters:
        message - The message to be inspected.
        Returns:
        The number of events contained in the passed message that must be rate limited.
        Throws:
        IllegalArgumentException - The message is a null reference