Package org.eclipse.microprofile.lra.annotation

# Enum LRAStatus

java.lang.Object
java.lang.Enum<LRAStatus>
org.eclipse.microprofile.lra.annotation.LRAStatus

All Implemented Interfaces:
  `Serializable`, `Comparable<LRAStatus>`

public enum LRAStatus extends Enum<LRAStatus>
A representation of the status of a Long Running Action according to a LRA state model: The initial state `Active` is entered when an LRA is created. The state `Cancelling` is entered when a request to cancel an LRA is received. The transition to end state `Cancelled` should occur when all the enlisted participants have indicated that they successfully compensated for any actions they performed when the LRA was executing. If any participant could not, and will never be able to, compensate then the final state of `FailedToCancel` is entered. The state `Closing` is entered when a request to close an LRA is received. The transition to end state `Closed` should occur when all the enlisted participants have indicated that they successfully completed any actions they performed when the LRA was executing. If any participant could not, and will never be able to, complete then the final state of `FailedToClose` is entered. This specification expects that this enum is consumable in JAX-RS implementations passed as an entity parameter. This means that if the JAX-RS implementation does not support enum types as entity parameters then the implementation of this specification should provide a custom message body reader that will handle this parsing.

## Enum Constant Summary

Enum Constants
Enum Constant
Description
`Active`
The LRA has not yet been asked to Close or Cancel
`Cancelled`
All participants associated with the LRA have successfully compensated for any work they performed when the LRA was active
`Cancelling`
The LRA is currently informing participants that they should compensate for any work they performed when the LRA was active
`Closed`
The LRA successfully told all participants to complete
`Closing`
The LRA is asking all participants to complete
`FailedToCancel`
One or more participants associated with the LRA were not able to compensate for the work they performed when the LRA was active
`FailedToClose`
One or more participants associated with the LRA were not able to complete the work they performed when the LRA was active

## Method Summary

Modifier and Type
Method
Description
`static LRAStatus`
`valueOf(String name)`
Returns the enum constant of this type with the specified name.
`static LRAStatus[]`
`values()`
Returns an array containing the constants of this enum type, in the order they are declared.

### Methods inherited from class java.lang.Enum

`clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf`

### Methods inherited from class java.lang.Object

`getClass, notify, notifyAll, wait, wait, wait`

## Enum Constant Details

### Active

public static final LRAStatus Active
The LRA has not yet been asked to Close or Cancel

### Cancelling

public static final LRAStatus Cancelling
The LRA is currently informing participants that they should compensate for any work they performed when the LRA was active

### Cancelled

public static final LRAStatus Cancelled
All participants associated with the LRA have successfully compensated for any work they performed when the LRA was active

### FailedToCancel

public static final LRAStatus FailedToCancel
One or more participants associated with the LRA were not able to compensate for the work they performed when the LRA was active

### Closing

public static final LRAStatus Closing
The LRA is asking all participants to complete

### Closed

public static final LRAStatus Closed
The LRA successfully told all participants to complete

### FailedToClose

public static final LRAStatus FailedToClose
One or more participants associated with the LRA were not able to complete the work they performed when the LRA was active

## Method Details

### values

public static LRAStatus[] values()
Returns an array containing the constants of this enum type, in the order they are declared.

Returns:
  an array containing the constants of this enum type, in the order they are declared

### valueOf

public static LRAStatus 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 name
  `NullPointerException` - if the argument is null