Package org.apache.qpid.protonj2.engine
Enum TransactionState
- java.lang.Object
-
- java.lang.Enum<TransactionState>
-
- org.apache.qpid.protonj2.engine.TransactionState
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<TransactionState>
public enum TransactionState extends java.lang.Enum<TransactionState>
Indicates the current state of a givenTransaction
-
-
Enum Constant Summary
Enum Constants Enum Constant Description DECLARE_FAILED
ATransaction
is considered failed in theTransactionManager
responds with an error to theDeclare
action.DECLARED
ATransaction
is considered declared once theTransactionManager
has responded in the affirmative and assigned a transaction Id.DECLARING
ATransaction
is considered declaring once a Declare command has been sent to the remote but before any response has been received which assigns the transaction ID.DISCHARGE_FAILED
ATransaction
is considered failed in theTransactionManager
responds with an error to theDischarge
action.DISCHARGED
ATransaction
is considered discharged once aDischarge
has been requested and theTransactionManager
has responded in the affirmative that the request has been honored.DISCHARGING
ATransaction
is considered to b discharging once a Discharge command has been sent to the remote but before any response has been received indicating the outcome of the attempted discharge.IDLE
ATransaction
is considered IDLE until theTransactionManager
responds that it has been declared successfully and an transaction Id has been assigned.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static TransactionState
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static TransactionState[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
IDLE
public static final TransactionState IDLE
ATransaction
is considered IDLE until theTransactionManager
responds that it has been declared successfully and an transaction Id has been assigned.
-
DECLARING
public static final TransactionState DECLARING
ATransaction
is considered declaring once a Declare command has been sent to the remote but before any response has been received which assigns the transaction ID.
-
DECLARED
public static final TransactionState DECLARED
ATransaction
is considered declared once theTransactionManager
has responded in the affirmative and assigned a transaction Id.
-
DISCHARGING
public static final TransactionState DISCHARGING
ATransaction
is considered to b discharging once a Discharge command has been sent to the remote but before any response has been received indicating the outcome of the attempted discharge.
-
DISCHARGED
public static final TransactionState DISCHARGED
ATransaction
is considered discharged once aDischarge
has been requested and theTransactionManager
has responded in the affirmative that the request has been honored.
-
DECLARE_FAILED
public static final TransactionState DECLARE_FAILED
ATransaction
is considered failed in theTransactionManager
responds with an error to theDeclare
action.
-
DISCHARGE_FAILED
public static final TransactionState DISCHARGE_FAILED
ATransaction
is considered failed in theTransactionManager
responds with an error to theDischarge
action.
-
-
Method Detail
-
values
public static TransactionState[] 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 (TransactionState c : TransactionState.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static TransactionState valueOf(java.lang.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:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
-