Class SubscriptionAck

    • Method Detail

      • failedSubscription

        public static SubscriptionAck failedSubscription​(String id,
                                                         String message)
        Builds a failure acknowledgement.
        Parameters:
        id - correlation id
        message - error message
        Returns:
        a new failed subscription
      • successfulSubscription

        public static SubscriptionAck successfulSubscription​(String id,
                                                             String message,
                                                             String topic)
        Builds a successful acknowledgement.
        Parameters:
        id - correlation id
        message - success message
        topic - name of the subscribed topic
        Returns:
        a new success subscription
      • getId

        public String getId()
        Returns the request message id. This can be used to correlate request and response messages together.
        Returns:
        the request message id.
      • getTopic

        public String getTopic()
        Returns the name of the topic, subject of the (un-)subscription request (is null for failure).
        Returns:
        the name of the topic (or null).
      • isSuccess

        public boolean isSuccess()
        Returns true if this acknowledgment message is a success, false otherwise.
        Returns:
        true if this acknowledgment message is a success, false otherwise.
      • isError

        public boolean isError()
        Returns true if this acknowledgment message is a failure, false otherwise.
        Returns:
        true if this acknowledgment message is a failure, false otherwise.
      • getMessage

        public String getMessage()
        Returns acknowledgement message.
        Returns:
        acknowledgement message.