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.Substateafterprivate ServiceController.Substatebefore
-
Constructor Summary
Constructors Modifier Constructor Description privateTransition(ServiceController.Substate before, ServiceController.Substate after)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanenters(ServiceController.State state)Determine whether this transition causes entry into the given state.booleanentersRestState()Determine whether this transition causes movement from a non-rest state to a rest state.booleanexits(ServiceController.State state)Determine whether this transition causes exit from the given state.ServiceController.SubstategetAfter()Get the target (new) state of this transition.ServiceController.SubstategetBefore()Get the source state of this transition.booleanin(ServiceController.Transition... transitions)Determine if this transition is one of the given transitions.booleanleavesRestState()Determine whether this transition causes movement from a rest state to a non-rest state.booleanretains(ServiceController.State state)Determine whether this substate transition retains the same given state before and after transition.java.lang.StringtoString()Get the string representation of this transition.static ServiceController.TransitionvalueOf(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_REQUESTEDtoDOWN.
-
START_REQUESTED_to_PROBLEM
public static final ServiceController.Transition START_REQUESTED_to_PROBLEM
Transition fromSTART_REQUESTEDtoPROBLEM.
-
START_REQUESTED_to_START_INITIATING
public static final ServiceController.Transition START_REQUESTED_to_START_INITIATING
Transition fromSTART_REQUESTEDtoSTART_INITIATING.
-
PROBLEM_to_START_REQUESTED
public static final ServiceController.Transition PROBLEM_to_START_REQUESTED
Transition fromPROBLEMtoSTART_REQUESTED.
-
START_INITIATING_to_STARTING
public static final ServiceController.Transition START_INITIATING_to_STARTING
Transition fromSTART_INITIATINGtoSTARTING.
-
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 fromSTARTINGtoSTART_FAILED.
-
START_FAILED_to_STARTING
public static final ServiceController.Transition START_FAILED_to_STARTING
Transition fromSTART_FAILEDtoSTART_INITIATING.
-
START_FAILED_to_DOWN
public static final ServiceController.Transition START_FAILED_to_DOWN
Transition fromSTART_FAILEDtoDOWN.
-
UP_to_STOP_REQUESTED
public static final ServiceController.Transition UP_to_STOP_REQUESTED
Transition fromUPtoSTOP_REQUESTED.
-
STOP_REQUESTED_to_UP
public static final ServiceController.Transition STOP_REQUESTED_to_UP
Transition fromSTOP_REQUESTEDtoUP.
-
STOP_REQUESTED_to_STOPPING
public static final ServiceController.Transition STOP_REQUESTED_to_STOPPING
Transition fromSTOP_REQUESTEDtoSTOPPING.
-
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 fromDOWNtoSTART_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 fromDOWNtoWONT_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_STARTtoDOWN.
-
CANCELLED_to_REMOVED
public static final ServiceController.Transition CANCELLED_to_REMOVED
Transition fromServiceController.Substate.CANCELLEDtoServiceController.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:
trueif 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:
trueif 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:
trueif 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:
trueif 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:
trueif 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:
trueif this transition is in the set;falseotherwise
-
toString
public java.lang.String toString()
Get the string representation of this transition.- Overrides:
toStringin classjava.lang.Enum<ServiceController.Transition>- Returns:
- the string
-
-