Package org.jboss.msc.service
Enum ServiceController.Transition
- java.lang.Object
-
- java.lang.Enum<ServiceController.Transition>
-
- org.jboss.msc.service.ServiceController.Transition
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<ServiceController.Transition>
- Enclosing interface:
- ServiceController<S>
public static enum ServiceController.Transition extends java.lang.Enum<ServiceController.Transition>
A transition from one substate to another. The list of possible transitions may change over time, so users should not rely on its permanence.
-
-
Enum Constant Summary
-
Field Summary
Fields Modifier and Type Field Description private ServiceController.Substate
after
private ServiceController.Substate
before
-
Constructor Summary
Constructors Modifier Constructor Description private
Transition(ServiceController.Substate before, ServiceController.Substate after)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
enters(ServiceController.State state)
Determine whether this transition causes entry into the given state.boolean
entersRestState()
Determine whether this transition causes movement from a non-rest state to a rest state.boolean
exits(ServiceController.State state)
Determine whether this transition causes exit from the given state.ServiceController.Substate
getAfter()
Get the target (new) state of this transition.ServiceController.Substate
getBefore()
Get the source state of this transition.boolean
in(ServiceController.Transition... transitions)
Determine if this transition is one of the given transitions.boolean
leavesRestState()
Determine whether this transition causes movement from a rest state to a non-rest state.boolean
retains(ServiceController.State state)
Determine whether this substate transition retains the same given state before and after transition.java.lang.String
toString()
Get the string representation of this transition.static ServiceController.Transition
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static ServiceController.Transition[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
START_REQUESTED_to_DOWN
public static final ServiceController.Transition START_REQUESTED_to_DOWN
Transition fromSTART_REQUESTED
toDOWN
.
-
START_REQUESTED_to_PROBLEM
public static final ServiceController.Transition START_REQUESTED_to_PROBLEM
Transition fromSTART_REQUESTED
toPROBLEM
.
-
START_REQUESTED_to_START_INITIATING
public static final ServiceController.Transition START_REQUESTED_to_START_INITIATING
Transition fromSTART_REQUESTED
toSTART_INITIATING
.
-
PROBLEM_to_START_REQUESTED
public static final ServiceController.Transition PROBLEM_to_START_REQUESTED
Transition fromPROBLEM
toSTART_REQUESTED
.
-
START_INITIATING_to_STARTING
public static final ServiceController.Transition START_INITIATING_to_STARTING
Transition fromSTART_INITIATING
toSTARTING
.
-
STARTING_to_UP
public static final ServiceController.Transition STARTING_to_UP
-
STARTING_to_START_FAILED
public static final ServiceController.Transition STARTING_to_START_FAILED
Transition fromSTARTING
toSTART_FAILED
.
-
START_FAILED_to_STARTING
public static final ServiceController.Transition START_FAILED_to_STARTING
Transition fromSTART_FAILED
toSTART_INITIATING
.
-
START_FAILED_to_DOWN
public static final ServiceController.Transition START_FAILED_to_DOWN
Transition fromSTART_FAILED
toDOWN
.
-
UP_to_STOP_REQUESTED
public static final ServiceController.Transition UP_to_STOP_REQUESTED
Transition fromUP
toSTOP_REQUESTED
.
-
STOP_REQUESTED_to_UP
public static final ServiceController.Transition STOP_REQUESTED_to_UP
Transition fromSTOP_REQUESTED
toUP
.
-
STOP_REQUESTED_to_STOPPING
public static final ServiceController.Transition STOP_REQUESTED_to_STOPPING
Transition fromSTOP_REQUESTED
toSTOPPING
.
-
STOPPING_to_DOWN
public static final ServiceController.Transition STOPPING_to_DOWN
-
REMOVING_to_REMOVED
public static final ServiceController.Transition REMOVING_to_REMOVED
-
REMOVING_to_DOWN
public static final ServiceController.Transition REMOVING_to_DOWN
-
DOWN_to_REMOVING
public static final ServiceController.Transition DOWN_to_REMOVING
-
DOWN_to_START_REQUESTED
public static final ServiceController.Transition DOWN_to_START_REQUESTED
Transition fromDOWN
toSTART_REQUESTED
.
-
DOWN_to_WAITING
public static final ServiceController.Transition DOWN_to_WAITING
-
DOWN_to_WONT_START
public static final ServiceController.Transition DOWN_to_WONT_START
Transition fromDOWN
toWONT_START
.
-
WAITING_to_DOWN
public static final ServiceController.Transition WAITING_to_DOWN
-
WONT_START_to_DOWN
public static final ServiceController.Transition WONT_START_to_DOWN
Transition fromWONT_START
toDOWN
.
-
CANCELLED_to_REMOVED
public static final ServiceController.Transition CANCELLED_to_REMOVED
Transition fromServiceController.Substate.CANCELLED
toServiceController.Substate.REMOVED
.
-
-
Field Detail
-
before
private final ServiceController.Substate before
-
after
private final ServiceController.Substate after
-
-
Constructor Detail
-
Transition
private Transition(ServiceController.Substate before, ServiceController.Substate after)
-
-
Method Detail
-
values
public static ServiceController.Transition[] 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 (ServiceController.Transition c : ServiceController.Transition.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static ServiceController.Transition 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
-
leavesRestState
public boolean leavesRestState()
Determine whether this transition causes movement from a rest state to a non-rest state.- Returns:
true
if this transition leaves a rest state
-
entersRestState
public boolean entersRestState()
Determine whether this transition causes movement from a non-rest state to a rest state.- Returns:
true
if this transition enters a rest state
-
enters
public boolean enters(ServiceController.State state)
Determine whether this transition causes entry into the given state.- Parameters:
state
- the state- Returns:
true
if the state is entered by this transition
-
exits
public boolean exits(ServiceController.State state)
Determine whether this transition causes exit from the given state.- Parameters:
state
- the state- Returns:
true
if the state is exited by this transition
-
retains
public boolean retains(ServiceController.State state)
Determine whether this substate transition retains the same given state before and after transition.- Parameters:
state
- the state- Returns:
true
if the state is retained
-
getBefore
public ServiceController.Substate getBefore()
Get the source state of this transition.- Returns:
- the source state
-
getAfter
public ServiceController.Substate getAfter()
Get the target (new) state of this transition.- Returns:
- the target state
-
in
public boolean in(ServiceController.Transition... transitions)
Determine if this transition is one of the given transitions.- Parameters:
transitions
- the transitions to check- Returns:
true
if this transition is in the set;false
otherwise
-
toString
public java.lang.String toString()
Get the string representation of this transition.- Overrides:
toString
in classjava.lang.Enum<ServiceController.Transition>
- Returns:
- the string
-
-