public final class ResourceAdaptorEntityState extends Object implements Serializable
A singleton instance of each enumerated value is guaranteed (via an implementation
of readResolve()
- refer java.io.Serializable
),
so that equality tests using ==
are always evaluated correctly. (This
equality test is only guaranteed if this class is loaded in the application's boot class
path, rather than dynamically loaded at runtime.)
Modifier and Type | Field and Description |
---|---|
static ResourceAdaptorEntityState |
ACTIVE
The ACTIVE state indicates that the resource adaptor entity has been activated and
it is able to deliver events from the underlying resource to the SLEE.
|
static String |
ACTIVE_STRING
A string representation of the
ACTIVE state. |
static int |
ENTITY_ACTIVE
An integer representation of the
ACTIVE state. |
static int |
ENTITY_INACTIVE
An integer representation of the
INACTIVE state. |
static int |
ENTITY_STOPPING
An integer representation of the
STOPPING state. |
static ResourceAdaptorEntityState |
INACTIVE
The INACTIVE state indicates that the resource adaptor entity has been successfully
created and configured.
|
static String |
INACTIVE_STRING
A string representation of the
INACTIVE state. |
static ResourceAdaptorEntityState |
STOPPING
The STOPPING state indicates that an active resource adaptor entity has been
deactivated but some activities created by the resource adaptor entity still exist.
|
static String |
STOPPING_STRING
A string representation of the
STOPPING state. |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj)
Compare this resource adaptor state for equality with another.
|
static ResourceAdaptorEntityState |
fromInt(int state)
Get a
ResourceAdaptorEntityState object from an integer value. |
static ResourceAdaptorEntityState |
fromString(String state)
Get a
ResourceAdaptorEntityState object from a string value. |
int |
hashCode()
Get a hash code value for this resource adaptor state.
|
boolean |
isActive()
Determine if this ResourceAdaptorEntityState object represents the ACTIVE state of
a resource adaptor entity.
|
boolean |
isInactive()
Determine if this ResourceAdaptorEntityState object represents the INACTIVE state of
a resource adaptor entity.
|
boolean |
isStopping()
Determine if this ResourceAdaptorEntityState object represents the STOPPING state of
a resource adaptor entity.
|
int |
toInt()
Get an integer value representation for this
ResourceAdaptorEntityState object. |
String |
toString()
Get the textual representation of the ResourceAdaptorEntityState object.
|
public static final int ENTITY_INACTIVE
INACTIVE
state.public static final int ENTITY_ACTIVE
ACTIVE
state.public static final int ENTITY_STOPPING
STOPPING
state.public static final String INACTIVE_STRING
INACTIVE
state.public static final String ACTIVE_STRING
ACTIVE
state.public static final String STOPPING_STRING
STOPPING
state.public static final ResourceAdaptorEntityState INACTIVE
public static final ResourceAdaptorEntityState ACTIVE
public static final ResourceAdaptorEntityState STOPPING
public static ResourceAdaptorEntityState fromInt(int state) throws IllegalArgumentException
ResourceAdaptorEntityState
object from an integer value.state
- the state as an integer.ResourceAdaptorEntityState
object corresponding to state
.IllegalArgumentException
- if state
is not a valid resource
adaptor entity state value.public static ResourceAdaptorEntityState fromString(String state) throws NullPointerException, IllegalArgumentException
ResourceAdaptorEntityState
object from a string value.state
- the state as a string, for example as returned by the toString()
method (case insensitive).ResourceAdaptorEntityState
object corresponding to state
.NullPointerException
- if state
is null
.IllegalArgumentException
- if state
is not a valid resource
adaptor entity state string.public int toInt()
ResourceAdaptorEntityState
object.ResourceAdaptorEntityState
object.public boolean isInactive()
This method is effectively equivalent to the conditional test:
(this == INACTIVE)
, ie. the code:
if (state.isInactive()) ...
is interchangeable with the code:
if (state == ResourceAdaptorEntityState.INACTIVE) ...
true
if this object represents the INACTIVE state of a resource
adaptor entity, false
otherwise.public boolean isActive()
This method is effectively equivalent to the conditional test:
(this == ACTIVE)
, ie. the code:
if (state.isActive()) ...
is interchangeable with the code:
if (state == ResourceAdaptorEntityState.ACTIVE) ...
true
if this object represents the ACTIVE state of a resource
adaptor entity, false
otherwise.public boolean isStopping()
This method is effectively equivalent to the conditional test:
(this == STOPPING)
, ie. the code:
if (state.isStopping()) ...
is interchangeable with the code:
if (state == ResourceAdaptorEntityState.STOPPING) ...
true
if this object represents the STOPPING state of a
resource adaptor entity, false
otherwise.public boolean equals(Object obj)
public int hashCode()