public class DefaultInteractiveMode extends Object implements InteractiveMode
| Modifier and Type | Field and Description |
|---|---|
protected SpongeEngine |
engine |
protected String |
kbName |
| Constructor and Description |
|---|
DefaultInteractiveMode(SpongeEngine engine,
String kbName,
Supplier<InteractiveModeConsole> consoleSupplier) |
| Modifier and Type | Method and Description |
|---|---|
InteractiveModeConsole |
getConsole() |
ExceptionHandler |
getExceptionHandler() |
protected ScriptKnowledgeBaseInterpreter |
getScriptKnowledgeBaseInterpreter() |
protected String |
getWelcomeMessage() |
protected void |
handleException(String sourceName,
Throwable e) |
boolean |
isRunning() |
protected boolean |
iteration(InteractiveModeConsole reader,
ScriptKnowledgeBaseInterpreter scriptInterpreter) |
void |
loop() |
void |
setExceptionHandler(ExceptionHandler exceptionHandler) |
protected SpongeEngine engine
protected String kbName
public DefaultInteractiveMode(SpongeEngine engine, String kbName, Supplier<InteractiveModeConsole> consoleSupplier)
public void loop()
loop in interface InteractiveModeprotected boolean iteration(InteractiveModeConsole reader, ScriptKnowledgeBaseInterpreter scriptInterpreter) throws IOException
IOExceptionpublic ExceptionHandler getExceptionHandler()
getExceptionHandler in interface InteractiveModepublic void setExceptionHandler(ExceptionHandler exceptionHandler)
setExceptionHandler in interface InteractiveModeprotected ScriptKnowledgeBaseInterpreter getScriptKnowledgeBaseInterpreter()
protected String getWelcomeMessage()
public InteractiveModeConsole getConsole()
getConsole in interface InteractiveModepublic boolean isRunning()
isRunning in interface InteractiveModeCopyright © 2016–2019 Softelnet. All rights reserved.