public class BasicStateMachineEngine extends Object implements StateMachineEngine
| Modifier and Type | Field and Description |
|---|---|
static AtomicInteger |
CHECK_AVAILABLE_SESSIONS_PERIOD_IN_MILLIS |
protected AtomicBoolean |
isActive |
protected ReentrantLock |
sessionLock |
protected ReentrantLock |
startStopLock |
| Constructor and Description |
|---|
BasicStateMachineEngine() |
BasicStateMachineEngine(List<XppActionParser> customActionParsers) |
BasicStateMachineEngine(List<XppActionParser> customActionParsers,
FSMLogCallback logCallback) |
public static AtomicInteger CHECK_AVAILABLE_SESSIONS_PERIOD_IN_MILLIS
protected final ReentrantLock startStopLock
protected volatile AtomicBoolean isActive
protected final ReentrantLock sessionLock
public BasicStateMachineEngine()
throws ConfigurationException
ConfigurationExceptionpublic BasicStateMachineEngine(List<XppActionParser> customActionParsers) throws ConfigurationException
ConfigurationExceptionpublic BasicStateMachineEngine(List<XppActionParser> customActionParsers, FSMLogCallback logCallback) throws ConfigurationException
ConfigurationExceptionprotected void initDefaultValues()
public void start()
start in interface StateMachineEnginepublic boolean shutdownAndWait(long timeout,
TimeUnit unit)
throws InterruptedException
shutdownAndWait in interface StateMachineEngineInterruptedExceptionpublic void forceShutdown()
forceShutdown in interface StateMachineEnginepublic Context startFSMSession(URI fsmModelUri) throws ConfigurationException, IOException, SCXMLParserException
startFSMSession in interface StateMachineEngineConfigurationExceptionIOExceptionSCXMLParserExceptionpublic Context startFSMSession(String parentSessionId, URI fsmModelUri) throws ConfigurationException, IOException, SCXMLParserException
startFSMSession in interface StateMachineEngineConfigurationExceptionIOExceptionSCXMLParserExceptionpublic Context startFSMSession(String sessionId, String parentSessionId, URI fsmModelUri, Map<String,Serializable> initValues) throws ConfigurationException, IOException, SCXMLParserException
startFSMSession in interface StateMachineEngineConfigurationExceptionIOExceptionSCXMLParserExceptionpublic Context getSession(String sessionId)
getSession in interface StateMachineEnginepublic void pushEvent(String sessionId, Event event)
pushEvent in interface StateMachineEnginepublic boolean isSessionActive(String sessionId)
isSessionActive in interface StateMachineEnginepublic void endSession(String sessionId)
endSession in interface StateMachineEnginepublic void registerIOProcessor(IOProcessor ioProcessor)
registerIOProcessor in interface StateMachineEnginepublic void unRegisterIOProcessor(String name)
unRegisterIOProcessor in interface StateMachineEnginepublic void registerInvokeHandler(InvokeHandler invokeHandler)
registerInvokeHandler in interface StateMachineEnginepublic void unRegisterInvokeHandler(String type)
unRegisterInvokeHandler in interface StateMachineEnginepublic StateMachineParser getParser()
getParser in interface StateMachineEnginepublic void setParser(StateMachineParser parser)
setParser in interface StateMachineEnginepublic void setStateMachineFramework(StateMachineFramework framework)
setStateMachineFramework in interface StateMachineEnginepublic Set<IOProcessor> getIOProcessors()
getIOProcessors in interface StateMachineEnginepublic IOProcessor getIOProcessor(String name)
getIOProcessor in interface StateMachineEnginepublic Set<InvokeHandler> getInvokeHandlers()
getInvokeHandlers in interface StateMachineEnginepublic InvokeHandler getInvokeHandler(String type)
getInvokeHandler in interface StateMachineEnginepublic StateMachineFramework getStateMachineFramework()
getStateMachineFramework in interface StateMachineEngineprotected PriorityBlockingQueue<Context> createBusyPriorityBlockingQueue()
public Collection<Context> getActiveSessions()
getActiveSessions in interface StateMachineEnginepublic void setContextFactory(ContextFactory contextFactory)
setContextFactory in interface StateMachineEnginepublic void setLogCallback(FSMLogCallback logCallback)
setLogCallback in interface StateMachineEnginepublic FSMLogCallback getLogCallback()
getLogCallback in interface StateMachineEngineCopyright © 2015. All rights reserved.