public interface StateMachineEngine
| Modifier and Type | Method and Description |
|---|---|
void |
endSession(String sessionId)
When a FSM session finish this method is called to cleanup internal variables and to avoid more events to be
processed.
|
void |
forceShutdown() |
Collection<Context> |
getActiveSessions() |
InvokeHandler |
getInvokeHandler(String type) |
Set<InvokeHandler> |
getInvokeHandlers() |
IOProcessor |
getIOProcessor(String name) |
Set<IOProcessor> |
getIOProcessors() |
FSMLogCallback |
getLogCallback()
Used to get the same logger as the fsm.
|
StateMachineParser |
getParser() |
Context |
getSession(String sessionId)
Get a session by id.
|
StateMachineFramework |
getStateMachineFramework() |
boolean |
isSessionActive(String sessionId)
Checks if there is an FSM session active with the indicated session id.
|
void |
pushEvent(String sessionId,
Event event)
Look up the FSM session and push an event to its external event queue.
|
void |
registerInvokeHandler(InvokeHandler invokeHandler) |
void |
registerIOProcessor(IOProcessor ioprocessor) |
void |
setContextFactory(ContextFactory contextFactory)
This factory will be used when the engine starts a new fsm session
|
void |
setLogCallback(FSMLogCallback logCallback)
Used to change default log (useful in android).
|
void |
setParser(StateMachineParser parser) |
void |
setStateMachineFramework(StateMachineFramework framework) |
boolean |
shutdownAndWait(long timeout,
TimeUnit unit) |
void |
start() |
Context |
startFSMSession(String sessionId,
String parentSessionId,
URI fsmModelUri,
Map<String,Serializable> initValues)
Used to start a SCXML session when the session id is known.
|
Context |
startFSMSession(String parentSessionId,
URI fsmModelUri)
Used to start a SCXML session with a parent session.
|
Context |
startFSMSession(URI fsmModelUri)
Used to start a SCXML session (normal scenario).
|
void |
unRegisterInvokeHandler(String type) |
void |
unRegisterIOProcessor(String name) |
void start()
void forceShutdown()
boolean shutdownAndWait(long timeout,
TimeUnit unit)
throws InterruptedException
InterruptedExceptionContext startFSMSession(URI fsmModelUri) throws ConfigurationException, IOException, SCXMLParserException
fsmModelURI - FSM model sourceIOExceptionConfigurationExceptionSCXMLParserExceptionContext startFSMSession(String parentSessionId, URI fsmModelUri) throws ConfigurationException, IOException, SCXMLParserException
parentSessionId - parent scxml session id (null could be passed if this doesn't applyfsmModelURI - FSM model sourceIOExceptionConfigurationExceptionSCXMLParserExceptionContext startFSMSession(String sessionId, String parentSessionId, URI fsmModelUri, Map<String,Serializable> initValues) throws ConfigurationException, IOException, SCXMLParserException
Invoke of type "scxml" is
called.sessionId - scxml session idparentSessionId - parent scxml session id (null could be passed if this doesn't applyfsmModelURI - FSM model sourceinitValues - invoke params used to initialize the called sessionConfigurationExceptionIOExceptionSCXMLParserExceptionboolean isSessionActive(String sessionId)
sessionId - Collection<Context> getActiveSessions()
Context getSession(String sessionId)
sessionId - void endSession(String sessionId)
sessionId - void pushEvent(String sessionId, Event event)
sessionId - event - Set<IOProcessor> getIOProcessors()
IOProcessor getIOProcessor(String name)
void registerIOProcessor(IOProcessor ioprocessor)
void unRegisterIOProcessor(String name)
Set<InvokeHandler> getInvokeHandlers()
InvokeHandler getInvokeHandler(String type)
void registerInvokeHandler(InvokeHandler invokeHandler)
void unRegisterInvokeHandler(String type)
void setParser(StateMachineParser parser)
StateMachineParser getParser()
void setStateMachineFramework(StateMachineFramework framework)
StateMachineFramework getStateMachineFramework()
void setContextFactory(ContextFactory contextFactory)
contextFactory - void setLogCallback(FSMLogCallback logCallback)
logCallback - FSMLogCallback getLogCallback()
Copyright © 2015. All rights reserved.