Package org.drools.core.rule
Class JavaDialectRuntimeData
java.lang.Object
org.drools.core.rule.JavaDialectRuntimeData
- All Implemented Interfaces:
Externalizable,Serializable,Cloneable,DialectRuntimeData
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone(DialectRuntimeRegistry registry, ClassLoader rootClassLoader) clone(DialectRuntimeRegistry registry, ClassLoader rootClassLoader, boolean excludeClasses) byte[]getBytecode(String resourceName) byte[]getClassDefinition(String className) getStore()booleanisDirty()voidmerge(DialectRuntimeRegistry registry, DialectRuntimeData newData) voidmerge(DialectRuntimeRegistry registry, DialectRuntimeData newData, boolean excludeClasses) voidonAdd(DialectRuntimeRegistry registry, ClassLoader rootClassLoader) voidvoidonRemove()voidputAllClassDefinitions(Map classDefinitions) voidputAllInvokers(Map<String, Wireable> invokers) voidputClassDefinition(String className, byte[] classDef) voidputInvoker(String className, Wireable invoker) byte[]voidreadExternal(ObjectInput stream) Handles the read serialization of the PackageCompilationData.voidreload()This class drops the classLoader and reloads it.booleanvoidremoveFunction(KnowledgePackageImpl pkg, Function function) voidremoveRule(KnowledgePackageImpl pkg, RuleImpl rule) voidsetDirty(boolean dirty) toString()voidvoidwriteExternal(ObjectOutput stream) Handles the write serialization of the PackageCompilationData.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.drools.base.rule.DialectRuntimeData
compile, resetParserConfiguration
-
Constructor Details
-
JavaDialectRuntimeData
public JavaDialectRuntimeData()
-
-
Method Details
-
writeExternal
Handles the write serialization of the PackageCompilationData. Patterns in Rules may reference generated data which cannot be serialized by default methods. The PackageCompilationData holds a reference to the generated bytecode. The generated bytecode must be restored before any Rules.- Specified by:
writeExternalin interfaceExternalizable- Throws:
IOException
-
readExternal
Handles the read serialization of the PackageCompilationData. Patterns in Rules may reference generated data which cannot be serialized by default methods. The PackageCompilationData holds a reference to the generated bytecode; which must be restored before any Rules. A custom ObjectInputStream, able to resolve classes against the bytecode, is used to restore the Rules.- Specified by:
readExternalin interfaceExternalizable- Throws:
IOExceptionClassNotFoundException
-
onAdd
- Specified by:
onAddin interfaceDialectRuntimeData
-
onRemove
public void onRemove()- Specified by:
onRemovein interfaceDialectRuntimeData
-
onBeforeExecute
public void onBeforeExecute()- Specified by:
onBeforeExecutein interfaceDialectRuntimeData
-
clone
- Specified by:
clonein interfaceDialectRuntimeData
-
clone
public DialectRuntimeData clone(DialectRuntimeRegistry registry, ClassLoader rootClassLoader, boolean excludeClasses) - Specified by:
clonein interfaceDialectRuntimeData
-
merge
- Specified by:
mergein interfaceDialectRuntimeData
-
merge
public void merge(DialectRuntimeRegistry registry, DialectRuntimeData newData, boolean excludeClasses) - Specified by:
mergein interfaceDialectRuntimeData
-
isDirty
public boolean isDirty()- Specified by:
isDirtyin interfaceDialectRuntimeData
-
setDirty
public void setDirty(boolean dirty) - Specified by:
setDirtyin interfaceDialectRuntimeData
-
getStore
-
getBytecode
-
getClassLoader
- Specified by:
getClassLoaderin interfaceDialectRuntimeData
-
getRootClassLoader
- Specified by:
getRootClassLoaderin interfaceDialectRuntimeData
-
removeRule
- Specified by:
removeRulein interfaceDialectRuntimeData
-
removeFunction
- Specified by:
removeFunctionin interfaceDialectRuntimeData
-
read
-
write
-
remove
- Specified by:
removein interfaceDialectRuntimeData
-
reload
public void reload()This class drops the classLoader and reloads it. During this process it must re-wire all the invokeables.- Specified by:
reloadin interfaceDialectRuntimeData
-
toString
-
putInvoker
-
putAllInvokers
-
putClassDefinition
-
putAllClassDefinitions
-
getClassDefinition
-