public abstract class BaseScriptKnowledgeBaseInterpreter extends BaseKnowledgeBaseInterpreter implements org.openksavi.sponge.kb.ScriptKnowledgeBaseInterpreter
| Modifier and Type | Field and Description |
|---|---|
protected CachedScriptClassInstancePovider |
cachedScriptClassInstancePovider |
protected Object |
interpteterSynchro
Synchronization processor.
|
static String |
PROP_PATH_SEPARATOR |
| Modifier | Constructor and Description |
|---|---|
protected |
BaseScriptKnowledgeBaseInterpreter(org.openksavi.sponge.kb.KnowledgeBaseEngineOperations engineOperations,
org.openksavi.sponge.kb.KnowledgeBaseType type)
Creates a new knowledge base interpreter.
|
| Modifier and Type | Method and Description |
|---|---|
protected abstract <T> CachedScriptClassInstancePovider |
createCachedScriptClassInstancePovider() |
protected abstract org.openksavi.sponge.kb.ScriptKnowledgeBaseInterpreter |
createInterpreterInstance(org.openksavi.sponge.engine.Engine engine,
org.openksavi.sponge.kb.KnowledgeBase knowledgeBase) |
protected <T> T |
doCreateInstance(String className,
Class<T> javaClass)
Creates an instance of the given class.
|
protected void |
doLoad(Reader reader,
String fileName) |
protected void |
doReload(List<org.openksavi.sponge.kb.KnowledgeBaseScript> scripts) |
abstract <T> T |
eval(Reader reader,
String fileName) |
<T> T |
eval(String expression,
Class<T> cls) |
protected List<Class<?>> |
getStandardImportClasses() |
protected void |
invalidateCache() |
protected boolean |
isProcessorAbstract(String className) |
void |
load(org.openksavi.sponge.kb.KnowledgeBaseScript script) |
void |
load(List<org.openksavi.sponge.kb.KnowledgeBaseScript> scripts) |
void |
load(String fileName)
Loads the knowledge base from the file.
|
void |
load(String fileName,
Charset charset) |
void |
load(String fileName,
Charset charset,
boolean required) |
void |
load(String fileName,
String charset)
Loads the knowledge base from the file.
|
void |
onAfterReload()
Calls onAfterReload method in the knowledge base.
|
void |
onBeforeReload()
Calls onBeforeReload method in the knowledge base.
|
void |
onInit() |
void |
onLoad() |
void |
onShutdown()
Calls onShutdown method in the knowledge base.
|
void |
onStartup()
Calls onStartup method in the knowledge base.
|
protected abstract void |
prepareInterpreter()
Prepares the interpreter.
|
void |
reload(List<org.openksavi.sponge.kb.KnowledgeBaseScript> scripts) |
createPluginInstance, createProcessorInstance, getCustomRuleEventSpec, getEngineOperations, getLogger, getRuleEventSpec, getType, getVariable, resolveEventNameAndAliasclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waiteval, invokeFunction, invokeOptionalFunction, scanToAutoEnablecreatePluginInstance, createProcessorInstance, existsVariable, getEngineOperations, getJavaException, getRuleEventSpec, getScriptKnowledgeBaseProcessorClassName, getType, getVariable, getVariable, invokeMethod, isKnowledgeBaseException, setVariablepublic static final String PROP_PATH_SEPARATOR
protected Object interpteterSynchro
protected CachedScriptClassInstancePovider cachedScriptClassInstancePovider
protected BaseScriptKnowledgeBaseInterpreter(org.openksavi.sponge.kb.KnowledgeBaseEngineOperations engineOperations,
org.openksavi.sponge.kb.KnowledgeBaseType type)
engineOperations - an engine operations.type - a knowledge base type.protected abstract void prepareInterpreter()
protected abstract <T> CachedScriptClassInstancePovider createCachedScriptClassInstancePovider()
protected <T> T doCreateInstance(String className, Class<T> javaClass)
BaseKnowledgeBaseInterpreterdoCreateInstance in class BaseKnowledgeBaseInterpreterT - instance typeclassName - class name.javaClass - processor class.protected final void invalidateCache()
public final void load(List<org.openksavi.sponge.kb.KnowledgeBaseScript> scripts)
load in interface org.openksavi.sponge.kb.ScriptKnowledgeBaseInterpreterpublic final void load(String fileName)
load in interface org.openksavi.sponge.kb.ScriptKnowledgeBaseInterpreterfileName - file name.public final void load(String fileName, String charset)
load in interface org.openksavi.sponge.kb.ScriptKnowledgeBaseInterpreterfileName - file name.charset - charset.public final void load(String fileName, Charset charset)
load in interface org.openksavi.sponge.kb.ScriptKnowledgeBaseInterpreterpublic final void load(String fileName, Charset charset, boolean required)
load in interface org.openksavi.sponge.kb.ScriptKnowledgeBaseInterpreterpublic final void load(org.openksavi.sponge.kb.KnowledgeBaseScript script)
load in interface org.openksavi.sponge.kb.ScriptKnowledgeBaseInterpreterpublic final void reload(List<org.openksavi.sponge.kb.KnowledgeBaseScript> scripts)
reload in interface org.openksavi.sponge.kb.ScriptKnowledgeBaseInterpreterprotected void doReload(List<org.openksavi.sponge.kb.KnowledgeBaseScript> scripts)
public void onInit()
onInit in interface org.openksavi.sponge.kb.KnowledgeBaseOperationspublic void onLoad()
onLoad in interface org.openksavi.sponge.kb.KnowledgeBaseOperationspublic void onStartup()
onStartup in interface org.openksavi.sponge.kb.KnowledgeBaseOperationspublic void onShutdown()
onShutdown in interface org.openksavi.sponge.kb.KnowledgeBaseOperationspublic void onBeforeReload()
onBeforeReload in interface org.openksavi.sponge.kb.KnowledgeBaseOperationspublic void onAfterReload()
onAfterReload in interface org.openksavi.sponge.kb.KnowledgeBaseOperationspublic <T> T eval(String expression, Class<T> cls)
eval in interface org.openksavi.sponge.kb.ScriptKnowledgeBaseInterpreterprotected abstract org.openksavi.sponge.kb.ScriptKnowledgeBaseInterpreter createInterpreterInstance(org.openksavi.sponge.engine.Engine engine,
org.openksavi.sponge.kb.KnowledgeBase knowledgeBase)
protected boolean isProcessorAbstract(String className)
Copyright © 2016–2017 Softelnet. All rights reserved.