org.keridwen.core.state.impl
Class SCXMLStateMachine

java.lang.Object
  extended by org.keridwen.core.state.impl.SCXMLStateMachine
All Implemented Interfaces:
org.apache.commons.scxml.SCXMLListener, StateMachine, StateMachineListener

public class SCXMLStateMachine
extends Object
implements StateMachine, StateMachineListener


Constructor Summary
SCXMLStateMachine()
           
SCXMLStateMachine(org.apache.commons.scxml.env.jexl.JexlContext jexlContext, org.apache.commons.scxml.env.jexl.JexlEvaluator jexlEvaluator)
           
 
Method Summary
 void addStateMachineListener(StateMachineListener listenerToAdd)
           
 boolean containsState(String projectState)
           
 void dispatchCallEvent(String string)
           
 void dispatchSignalEvent(String string)
           
 List<String> getAvailableStates()
           
 String getCurrentState()
           
 Set<org.apache.commons.scxml.model.State> getCurrentStates()
           
 List<String> getLoadedStates()
           
 org.apache.commons.scxml.model.State getPreviousState()
           
 void onEntry(org.apache.commons.scxml.model.TransitionTarget state)
           
 void onExit(org.apache.commons.scxml.model.TransitionTarget state)
           
 void onTransition(org.apache.commons.scxml.model.TransitionTarget from, org.apache.commons.scxml.model.TransitionTarget to, org.apache.commons.scxml.model.Transition transition)
           
 void registerState(String stateName)
           
 void removeStateMachineListener(StateMachineListener listenerToRemove)
           
 void reset()
           
 void setInitialState(String initial)
           
 void setStateModel(URL scxmlDocument)
           
 void start()
           
 void statesLoadingChanged(int percent)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SCXMLStateMachine

public SCXMLStateMachine()

SCXMLStateMachine

public SCXMLStateMachine(org.apache.commons.scxml.env.jexl.JexlContext jexlContext,
                         org.apache.commons.scxml.env.jexl.JexlEvaluator jexlEvaluator)
Method Detail

setStateModel

public void setStateModel(URL scxmlDocument)
Specified by:
setStateModel in interface StateMachine

setInitialState

public void setInitialState(String initial)
Specified by:
setInitialState in interface StateMachine

start

public void start()
Specified by:
start in interface StateMachine

getCurrentStates

public Set<org.apache.commons.scxml.model.State> getCurrentStates()
Specified by:
getCurrentStates in interface StateMachine

dispatchSignalEvent

public void dispatchSignalEvent(String string)
Specified by:
dispatchSignalEvent in interface StateMachine

dispatchCallEvent

public void dispatchCallEvent(String string)
Specified by:
dispatchCallEvent in interface StateMachine

reset

public void reset()
Specified by:
reset in interface StateMachine

getPreviousState

public org.apache.commons.scxml.model.State getPreviousState()
Specified by:
getPreviousState in interface StateMachine

onEntry

public void onEntry(org.apache.commons.scxml.model.TransitionTarget state)
Specified by:
onEntry in interface org.apache.commons.scxml.SCXMLListener

onExit

public void onExit(org.apache.commons.scxml.model.TransitionTarget state)
Specified by:
onExit in interface org.apache.commons.scxml.SCXMLListener

onTransition

public void onTransition(org.apache.commons.scxml.model.TransitionTarget from,
                         org.apache.commons.scxml.model.TransitionTarget to,
                         org.apache.commons.scxml.model.Transition transition)
Specified by:
onTransition in interface org.apache.commons.scxml.SCXMLListener

addStateMachineListener

public void addStateMachineListener(StateMachineListener listenerToAdd)
Specified by:
addStateMachineListener in interface StateMachine

removeStateMachineListener

public void removeStateMachineListener(StateMachineListener listenerToRemove)
Specified by:
removeStateMachineListener in interface StateMachine

getCurrentState

public String getCurrentState()
Specified by:
getCurrentState in interface StateMachine

registerState

public void registerState(String stateName)
Specified by:
registerState in interface StateMachine

statesLoadingChanged

public void statesLoadingChanged(int percent)
Specified by:
statesLoadingChanged in interface StateMachineListener

containsState

public boolean containsState(String projectState)
Specified by:
containsState in interface StateMachine

getAvailableStates

public List<String> getAvailableStates()
Specified by:
getAvailableStates in interface StateMachine

getLoadedStates

public List<String> getLoadedStates()
Specified by:
getLoadedStates in interface StateMachine


Copyright © 2012-2013 Artenum. All Rights Reserved.