Enum JmsProperties.AcknowledgeMode
- java.lang.Object
- java.lang.Enum<JmsProperties.AcknowledgeMode>
- org.springframework.boot.autoconfigure.jms.JmsProperties.AcknowledgeMode
- All Implemented Interfaces:
Serializable
,Comparable<JmsProperties.AcknowledgeMode>
- Enclosing class:
- JmsProperties
public static enum JmsProperties.AcknowledgeMode extends Enum<JmsProperties.AcknowledgeMode>
Translate the acknowledge modes defined on theSession
.Session.SESSION_TRANSACTED
is not defined as we take care of this already via a call tosetSessionTransacted
.
Enum Constant Summary
Enum Constants Enum Constant Description AUTO
Messages sent or received from the session are automatically acknowledged.CLIENT
Messages are acknowledged once the message listener implementation has calledMessage.acknowledge()
.DUPS_OK
Similar to auto acknowledgment except that said acknowledgment is lazy.
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getMode()
static JmsProperties.AcknowledgeMode
valueOf(String name)
Returns the enum constant of this type with the specified name.static JmsProperties.AcknowledgeMode[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
Enum Constant Detail
AUTO
public static final JmsProperties.AcknowledgeMode AUTO
Messages sent or received from the session are automatically acknowledged. This is the simplest mode and enables once-only message delivery guarantee.
CLIENT
public static final JmsProperties.AcknowledgeMode CLIENT
Messages are acknowledged once the message listener implementation has calledMessage.acknowledge()
. This mode gives the application (rather than the JMS provider) complete control over message acknowledgement.
DUPS_OK
public static final JmsProperties.AcknowledgeMode DUPS_OK
Similar to auto acknowledgment except that said acknowledgment is lazy. As a consequence, the messages might be delivered more than once. This mode enables at-least-once message delivery guarantee.
Method Detail
values
public static JmsProperties.AcknowledgeMode[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (JmsProperties.AcknowledgeMode c : JmsProperties.AcknowledgeMode.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
valueOf
public static JmsProperties.AcknowledgeMode valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified nameNullPointerException
- if the argument is null
getMode
public int getMode()