Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.drools
Class KnowledgeBaseFactory

    java.lang.Object
      org.drools.KnowledgeBaseFactory

    public class KnowledgeBaseFactory

extends Object

This factory will create and return a KnowledgeBase instance, an optional KnowledgeBaseConfiguration can be provided. The KnowledgeBaseConfiguration is also itself created from this factory.

     KnowledgeBase kbase = KnowledgeBaseFactory.newKnowledgeBase();

Create sequential KnowledgeBase using the given ClassLoader.

     Properties properties = new Properties();
     properties.setOption( SequentialOption.YES );
     KnowledgeBaseConfiguration kbConf = KnowledgeBaseFactory.newKnowledgeBaseConfiguration(properties, myClassLoader);
     KnowledgeBase kbase = KnowledgeBaseFactory.newKnowledgeBase(kbConf);

The above could also have used the supported property

     properties.setProperty( "org.drools.sequential", "true");

See Also:
  `KnowledgeBase`

Constructor Summary
`KnowledgeBaseFactory()`

Method Summary
`static Environment` | `newEnvironment()`
`static KnowledgeBase` | `newKnowledgeBase()` Create a new KnowledgeBase using the default KnowledgeBaseConfiguration
`static KnowledgeBase` | `newKnowledgeBase(KnowledgeBaseConfiguration conf)` Create a new KnowledgeBase using the given KnowledgeBaseConfiguration
`static KnowledgeBase` | `newKnowledgeBase(String kbaseId)` Create a new KnowledgeBase using the default KnowledgeBaseConfiguration and the given KnowledgeBase ID.
`static KnowledgeBase` | `newKnowledgeBase(String kbaseId, KnowledgeBaseConfiguration conf)` Create a new KnowledgeBase using the given KnowledgeBaseConfiguration and the given KnowledgeBase ID.
`static KnowledgeBaseConfiguration` | `newKnowledgeBaseConfiguration()` Create a KnowledgeBaseConfiguration on which properties can be set.
`static KnowledgeBaseConfiguration` | `newKnowledgeBaseConfiguration(Properties properties, ClassLoader... classLoaders)` Create a KnowledgeBaseConfiguration on which properties can be set.
`static KnowledgeSessionConfiguration` | `newKnowledgeSessionConfiguration()` Create a KnowledgeSessionConfiguration on which properties can be set.
`static KnowledgeSessionConfiguration` | `newKnowledgeSessionConfiguration(Properties properties)` Create a KnowledgeSessionConfiguration on which properties can be set.
`static void` | `setKnowledgeBaseServiceFactory(KnowledgeBaseFactoryService serviceFactory)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### KnowledgeBaseFactory

    public KnowledgeBaseFactory()

Method Detail

### newKnowledgeBase

    public static KnowledgeBase newKnowledgeBase()

  Create a new KnowledgeBase using the default KnowledgeBaseConfiguration

  Returns:
    The KnowledgeBase

### newKnowledgeBase

    public static KnowledgeBase newKnowledgeBase(String kbaseId)

  Create a new KnowledgeBase using the default KnowledgeBaseConfiguration and the given KnowledgeBase ID.

  Parameters:
    `kbaseId` - A string Identifier for the knowledge base. Specially useful when enabling JMX monitoring and management, as that ID will be used to compose the JMX ObjectName for all related MBeans. The application must ensure all kbase IDs are unique.
  Returns:
    The KnowledgeBase

### newKnowledgeBase

    public static KnowledgeBase newKnowledgeBase(KnowledgeBaseConfiguration conf)

  Create a new KnowledgeBase using the given KnowledgeBaseConfiguration

  Returns:
    The KnowledgeBase

### newKnowledgeBase

    public static KnowledgeBase newKnowledgeBase(String kbaseId,
                                                 KnowledgeBaseConfiguration conf)

  Create a new KnowledgeBase using the given KnowledgeBaseConfiguration and the given KnowledgeBase ID.

  Parameters:
    `kbaseId` - A string Identifier for the knowledge base. Specially useful when enabling JMX monitoring and management, as that ID will be used to compose the JMX ObjectName for all related MBeans. The application must ensure all kbase IDs are unique.
  Returns:
    The KnowledgeBase

### newKnowledgeBaseConfiguration

    public static KnowledgeBaseConfiguration newKnowledgeBaseConfiguration()

  Create a KnowledgeBaseConfiguration on which properties can be set.

  Returns:
    The KnowledgeBaseConfiguration.

### newKnowledgeBaseConfiguration

    public static KnowledgeBaseConfiguration newKnowledgeBaseConfiguration(Properties properties,
                                                                           ClassLoader... classLoaders)

  Create a KnowledgeBaseConfiguration on which properties can be set. Use the given properties file and ClassLoader - either of which can be null.

  Returns:
    The KnowledgeBaseConfiguration.

### newKnowledgeSessionConfiguration

    public static KnowledgeSessionConfiguration newKnowledgeSessionConfiguration()

  Create a KnowledgeSessionConfiguration on which properties can be set.

  Returns:
    The KnowledgeSessionConfiguration.

### newKnowledgeSessionConfiguration

    public static KnowledgeSessionConfiguration newKnowledgeSessionConfiguration(Properties properties)

  Create a KnowledgeSessionConfiguration on which properties can be set.

  Returns:
    The KnowledgeSessionConfiguration.

### newEnvironment

    public static Environment newEnvironment()

### setKnowledgeBaseServiceFactory

    public static void setKnowledgeBaseServiceFactory(KnowledgeBaseFactoryService serviceFactory)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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