Enum Class AcknowledgeMode

java.lang.Object
java.lang.Enum<AcknowledgeMode>
io.helidon.messaging.connectors.jms.AcknowledgeMode
All Implemented Interfaces:
Serializable, Comparable<AcknowledgeMode>, Constable

public enum AcknowledgeMode extends Enum<AcknowledgeMode>
Enumeration equivalent for JMS api's Session.AUTO_ACKNOWLEDGE, Session.CLIENT_ACKNOWLEDGE and Session.DUPS_OK_ACKNOWLEDGE constants.
  • Enum Constant Details

    • AUTO_ACKNOWLEDGE

      public static final AcknowledgeMode AUTO_ACKNOWLEDGE
      Acknowledges automatically after message reception over JMS api.
    • CLIENT_ACKNOWLEDGE

      public static final AcknowledgeMode CLIENT_ACKNOWLEDGE
      Message is acknowledged when Message.ack() is invoked either manually or by Acknowledgment policy.
    • DUPS_OK_ACKNOWLEDGE

      public static final AcknowledgeMode DUPS_OK_ACKNOWLEDGE
      Messages are acknowledged lazily which can result in duplicate messages being delivered.
  • Method Details

    • values

      public static AcknowledgeMode[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static AcknowledgeMode valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • getAckMode

      public int getAckMode()
      Returns JMS api constant equivalent of this ack mode as specified in Connection.createSession(boolean, int).
      Returns:
      1 for AUTO_ACKNOWLEDGE or 2 for CLIENT_ACKNOWLEDGE or 3 for DUPS_OK_ACKNOWLEDGE