Пример #1
0
  /**
   * Marks the message as Modified, indicating whether it failed to deliver and is not deliverable
   * here.
   *
   * @param deliveryFailed indicates that the delivery failed for some reason.
   * @param undeliverableHere marks the delivery as not being able to be process by link it was sent
   *     to.
   * @throws Exception if an error occurs during the process.
   */
  public void modified(Boolean deliveryFailed, Boolean undeliverableHere) throws Exception {
    if (receiver == null) {
      throw new IllegalStateException("Can't modify non-received message.");
    }

    receiver.modified(delivery, deliveryFailed, undeliverableHere);
  }
Пример #2
0
  /**
   * Release the message, remote can redeliver it elsewhere.
   *
   * @throws Exception if an error occurs during the reject.
   */
  public void release() throws Exception {
    if (receiver == null) {
      throw new IllegalStateException("Can't release non-received message.");
    }

    receiver.release(delivery);
  }
Пример #3
0
  /**
   * Accepts the message marking it as consumed on the remote peer.
   *
   * @throws Exception if an error occurs during the accept.
   */
  public void accept() throws Exception {
    if (receiver == null) {
      throw new IllegalStateException("Can't accept non-received message.");
    }

    receiver.accept(delivery);
  }