|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.springframework.batch.core.job.flow.support.StateTransition
public class StateTransition
Value object representing a potential transition from one State to
another. The originating State name and the next State to execute are
linked by a pattern for the exit code of an
execution of the originating State.
| Method Summary | |
|---|---|
int |
compareTo(StateTransition other)
Sorts by decreasing specificity of pattern, based on just counting wildcards (with * taking precedence over ?). |
static StateTransition |
createEndStateTransition(State state)
Create a new end state StateTransition specification. |
static StateTransition |
createEndStateTransition(State state,
java.lang.String pattern)
Create a new end state StateTransition specification. |
static StateTransition |
createStateTransition(State state,
java.lang.String next)
Create a new state StateTransition specification with a wildcard
pattern that matches all outcomes. |
static StateTransition |
createStateTransition(State state,
java.lang.String pattern,
java.lang.String next)
Create a new StateTransition specification from one State
to another (by name). |
java.lang.String |
getNext()
Public getter for the next State name. |
State |
getState()
Public getter for the State. |
boolean |
isEnd()
Check for a special next State signalling the end of a job. |
boolean |
matches(java.lang.String status)
Check if the provided status matches the pattern, signalling that the next State should be executed. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Method Detail |
|---|
public static StateTransition createEndStateTransition(State state)
StateTransition specification. This
transition explicitly goes unconditionally to an end state (i.e. no more
executions).
state - the State used to generate the outcome for this
transition
public static StateTransition createEndStateTransition(State state,
java.lang.String pattern)
StateTransition specification. This
transition explicitly goes to an end state (i.e. no more processing) if
the outcome matches the pattern.
state - the State used to generate the outcome for this
transitionpattern - the pattern to match in the exit status of the
State
public static StateTransition createStateTransition(State state,
java.lang.String next)
StateTransition specification with a wildcard
pattern that matches all outcomes.
state - the State used to generate the outcome for this
transitionnext - the name of the next State to execute
public static StateTransition createStateTransition(State state,
java.lang.String pattern,
java.lang.String next)
StateTransition specification from one State
to another (by name).
state - the State used to generate the outcome for this
transitionpattern - the pattern to match in the exit status of the
Statenext - the name of the next State to executepublic State getState()
public java.lang.String getNext()
public boolean matches(java.lang.String status)
status - the status to compare
public boolean isEnd()
public int compareTo(StateTransition other)
compareTo in interface java.lang.Comparable<StateTransition>Comparable.compareTo(Object)public java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||