Record Class JmsAcknowledge

java.lang.Object
java.lang.Record
org.mule.jms.commons.internal.operation.JmsAcknowledge

public record JmsAcknowledge(JmsSessionManager sessionManager) extends Record
Operation that allows the user to perform an ACK over a Message produced by the current JmsSession
Since:
1.0
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates an instance of a JmsAcknowledge record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    ack(String ackId, org.mule.runtime.extension.api.runtime.process.CompletionCallback<Void,Void> completionCallback)
    Allows the user to perform an ACK when the AckMode.MANUAL mode is elected while consuming the Message.
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    void
    recoverSession(String ackId, org.mule.runtime.extension.api.runtime.process.CompletionCallback<Void,Void> completionCallback)
    Allows the user to perform a session recover when the AckMode.MANUAL mode is elected while consuming the Message.
    Returns the value of the sessionManager record component.
    final String
    Returns a string representation of this record class.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • JmsAcknowledge

      public JmsAcknowledge(JmsSessionManager sessionManager)
      Creates an instance of a JmsAcknowledge record class.
      Parameters:
      sessionManager - the value for the sessionManager record component
  • Method Details

    • ack

      @Throws(JmsAckErrorTypeProvider.class) public void ack(@Summary("The AckId of the Message to ACK") String ackId, org.mule.runtime.extension.api.runtime.process.CompletionCallback<Void,Void> completionCallback)
      Allows the user to perform an ACK when the AckMode.MANUAL mode is elected while consuming the Message. As per JMS Spec, performing an ACK over a single Message automatically works as an ACK for all the Messages produced in the same JmsSession.
      Parameters:
      ackId - The AckId of the Message to ACK
      Throws:
      JmsAckException - if the JmsSession or JmsConnection were closed, or if the ID doesn't belong to a session of the current connection
    • recoverSession

      @Throws(JmsSessionRecoverErrorTypeProvider.class) public void recoverSession(String ackId, org.mule.runtime.extension.api.runtime.process.CompletionCallback<Void,Void> completionCallback)
      Allows the user to perform a session recover when the AckMode.MANUAL mode is elected while consuming the Message. As per JMS Spec, performing a session recover automatically will redeliver all the consumed messages that had not being acknowledged before this recover.
      Parameters:
      ackId - The AckId of the Message Session to recover
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • sessionManager

      public JmsSessionManager sessionManager()
      Returns the value of the sessionManager record component.
      Returns:
      the value of the sessionManager record component