|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.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,
String pattern)
Create a new end state StateTransition specification. |
static StateTransition |
createStateTransition(State state,
String next)
Create a new state StateTransition specification with a wildcard
pattern that matches all outcomes. |
static StateTransition |
createStateTransition(State state,
String pattern,
String next)
Create a new StateTransition specification from one State
to another (by name). |
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(String status)
Check if the provided status matches the pattern, signalling that the next State should be executed. |
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
transitionpublic static StateTransition createEndStateTransition(State state, 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, 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 executepublic static StateTransition createStateTransition(State state, String pattern, 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
State
next
- the name of the next State
to executepublic State getState()
public String getNext()
public boolean matches(String status)
status
- the status to compare
public boolean isEnd()
public int compareTo(StateTransition other)
compareTo
in interface Comparable<StateTransition>
Comparable.compareTo(Object)
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |