|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.mina.statemachine.StateMachineFactory
public class StateMachineFactory
Creates StateMachine
s by reading State
,
Transition
and Transitions
(or equivalent) annotations from one or more arbitrary
objects.
Constructor Summary | |
---|---|
protected |
StateMachineFactory(Class<? extends Annotation> transitionAnnotation,
Class<? extends Annotation> transitionsAnnotation)
|
Method Summary | |
---|---|
StateMachine |
create(Object handler)
Creates a new StateMachine from the specified handler object and
using a start state with id start . |
StateMachine |
create(Object handler,
Object... handlers)
Creates a new StateMachine from the specified handler objects and
using a start state with id start . |
StateMachine |
create(String start,
Object handler)
Creates a new StateMachine from the specified handler object and
using the State with the specified id as start state. |
StateMachine |
create(String start,
Object handler,
Object... handlers)
Creates a new StateMachine from the specified handler objects and
using the State with the specified id as start state. |
static StateMachineFactory |
getInstance(Class<? extends Annotation> transitionAnnotation)
Returns a new StateMachineFactory instance which creates
StateMachine s by reading the specified Transition
equivalent annotation. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected StateMachineFactory(Class<? extends Annotation> transitionAnnotation, Class<? extends Annotation> transitionsAnnotation)
Method Detail |
---|
public static StateMachineFactory getInstance(Class<? extends Annotation> transitionAnnotation)
StateMachineFactory
instance which creates
StateMachine
s by reading the specified Transition
equivalent annotation.
transitionAnnotation
- the Transition
equivalent annotation.
StateMachineFactory
.public StateMachine create(Object handler)
StateMachine
from the specified handler object and
using a start state with id start
.
handler
- the object containing the annotations describing the
state machine.
StateMachine
object.public StateMachine create(String start, Object handler)
StateMachine
from the specified handler object and
using the State
with the specified id as start state.
start
- the id of the start State
to use.handler
- the object containing the annotations describing the
state machine.
StateMachine
object.public StateMachine create(Object handler, Object... handlers)
StateMachine
from the specified handler objects and
using a start state with id start
.
handler
- the first object containing the annotations describing the
state machine.handlers
- zero or more additional objects containing the
annotations describing the state machine.
StateMachine
object.public StateMachine create(String start, Object handler, Object... handlers)
StateMachine
from the specified handler objects and
using the State
with the specified id as start state.
start
- the id of the start State
to use.handler
- the first object containing the annotations describing the
state machine.handlers
- zero or more additional objects containing the
annotations describing the state machine.
StateMachine
object.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |