org.drools.core.util
Class BinaryRuleBaseLoader

java.lang.Object
  extended by org.drools.core.util.BinaryRuleBaseLoader

public class BinaryRuleBaseLoader
extends Object

This loads up rulebases from binary packages. Can work with an existing or a new rulebase. This is useful for deployment.


Constructor Summary
BinaryRuleBaseLoader()
          This will create a new default rulebase (which is initially empty).
BinaryRuleBaseLoader(RuleBase rb)
          This will add any binary packages to the rulebase.
BinaryRuleBaseLoader(RuleBase rb, ClassLoader classLoader)
          This will add any binary packages to the rulebase.
 
Method Summary
 void addPackage(InputStream in)
          This will add the BINARY package to the rulebase.
 void addPackage(InputStream in, ClassLoader classLoader)
          This will add the BINARY package to the rulebase.
 RuleBase getRuleBase()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BinaryRuleBaseLoader

public BinaryRuleBaseLoader()
This will create a new default rulebase (which is initially empty). Optional parent classLoader for the Package's internal ClassLoader is Thread.currentThread.getContextClassLoader()


BinaryRuleBaseLoader

public BinaryRuleBaseLoader(RuleBase rb)
This will add any binary packages to the rulebase. Optional parent classLoader for the Package's internal ClassLoader is Thread.currentThread.getContextClassLoader()


BinaryRuleBaseLoader

public BinaryRuleBaseLoader(RuleBase rb,
                            ClassLoader classLoader)
This will add any binary packages to the rulebase. Optional classLoader to be used as the parent ClassLoader for the Package's internal ClassLoader, is Thread.currentThread.getContextClassLoader() if not user specified.

Method Detail

addPackage

public void addPackage(InputStream in)
This will add the BINARY package to the rulebase. Uses the member ClassLoader as the Package's internal parent classLoader which is Thread.currentThread.getContextClassLoader if not user specified

Parameters:
in - An input stream to the serialized package.

addPackage

public void addPackage(InputStream in,
                       ClassLoader classLoader)
This will add the BINARY package to the rulebase.

Parameters:
in - An input stream to the serialized package.
classLoader - used as the parent ClassLoader for the Package's internal ClassLaoder

getRuleBase

public RuleBase getRuleBase()


Copyright © 2001-2012 JBoss by Red Hat. All Rights Reserved.