public interface KnowledgeBaseInterpreter
| Modifier and Type | Method and Description |
|---|---|
Plugin |
createPluginInstance(String pluginClassName)
Creates a plugin instance.
|
<T extends Processor> |
createProcessorInstance(String processorClassName,
Class<T> javaClass)
Creates a new processor instance.
|
ProcessorInstanceHolder |
createProcessorInstanceByProcessorClass(KnowledgeBase knowledgeBase,
Object processorClass,
Class<?> javaClass)
Returns the processor new instance holder.
|
boolean |
existsVariable(String name)
Returns
true if a variable named name exists. |
KnowledgeBaseEngineOperations |
getEngineOperations()
Returns engine operations associated with this knowledge base interpreter.
|
Throwable |
getJavaException(Throwable knowledgeBaseException)
Returns a Java exception corresponding to the knowledge base specific exception.
|
RuleEventSpec |
getRuleEventSpec(Object eventSpecEntry)
Returns event specification for rule defined in the knowledge base.
|
String |
getScriptKnowledgeBaseProcessorClassName(Object processorClass)
Returns script knowledge base processor class name.
|
String |
getSpecificExceptionMessage(Throwable e)
Returns the implementation-specific error message or
null if no specific message is necessary. |
KnowledgeBaseType |
getType()
Returns knowledge base interpreter type.
|
Object |
getVariable(String name)
Returns the value of the variable.
|
<T> T |
getVariable(String name,
Class<T> cls)
Returns the value of the variable.
|
Object |
invokeMethod(Object target,
String name,
Object... args)
Invokes a method.
|
boolean |
isKnowledgeBaseException(Throwable exception)
Verifies if the given exception is a knowledge base specific one.
|
void |
setVariable(String name,
Object value)
Sets the variable value.
|
KnowledgeBaseType getType()
Object invokeMethod(Object target, String name, Object... args)
target - the processor containing the method to be invoked.name - method name.args - method arguments.void setVariable(String name, Object value)
name - variable name.value - variable value.Object getVariable(String name)
name - variable name.<T> T getVariable(String name, Class<T> cls)
T - variable.name - variable name.cls - variable class.boolean existsVariable(String name)
true if a variable named name exists.name - variable name.true if a variable named name exists.<T extends Processor> T createProcessorInstance(String processorClassName, Class<T> javaClass)
T - processor type.processorClassName - processor class name.javaClass - processor class.Plugin createPluginInstance(String pluginClassName)
pluginClassName - a plugin class name.RuleEventSpec getRuleEventSpec(Object eventSpecEntry)
eventSpecEntry - event specification entry.boolean isKnowledgeBaseException(Throwable exception)
exception - an exception to be verified.Throwable getJavaException(Throwable knowledgeBaseException)
knowledgeBaseException - the knowledge base specific exception.String getScriptKnowledgeBaseProcessorClassName(Object processorClass)
processorClass - processor class.null if processorClass doesn't represent a script knowledge
base processor.ProcessorInstanceHolder createProcessorInstanceByProcessorClass(KnowledgeBase knowledgeBase, Object processorClass, Class<?> javaClass)
knowledgeBase - the knowledge base.processorClass - the processor class.javaClass - the Java class of the processor.null if this interpreter doesn't support the given processor class.KnowledgeBaseEngineOperations getEngineOperations()
Copyright © 2016–2018 Softelnet. All rights reserved.