KIE API 6.2.0.Beta1

org.kie.api
Interface KieServices


public interface KieServices

The KieServices is a thread-safe singleton acting as a hub giving access to the other Services provided by Kie. As general rule a getX() method just returns a reference to another singleton while a newX() one creates a new instance.

It is possible to obtain a KieServices reference via its Factory as it follows

 KieServices kieServices = KieServices.Factory.get();
 


Nested Class Summary
static class KieServices.Factory
          A Factory for this KieServices
 
Method Summary
 KieCommands getCommands()
          Returns the KieCommands, a factory for Commands
 KieContainer getKieClasspathContainer()
          Returns KieContainer for the classpath, this a global singleton
 KieContainer getKieClasspathContainer(ClassLoader classLoader)
          Returns KieContainer for the classpath using the given classLoader, this a global singleton
 KieLoggers getLoggers()
          Returns KieLoggers, a factory for KieRuntimeLogger
 KieMarshallers getMarshallers()
          Returns the KieMarshallers service
 KieRepository getRepository()
          Returns the KieRepository, a singleton acting as a repository for all the available KieModules
 KieResources getResources()
          Returns the KieResources, a factory that provides Resource implementations for the desired IO resource
 KieStoreServices getStoreServices()
          Returns KieStoreServices
 Environment newEnvironment()
          Instantiate and return an Environment
 KieBaseConfiguration newKieBaseConfiguration()
          Create a KieBaseConfiguration on which properties can be set.
 KieBaseConfiguration newKieBaseConfiguration(Properties properties)
          Create a KieBaseConfiguration on which properties can be set.
 KieBaseConfiguration newKieBaseConfiguration(Properties properties, ClassLoader classLoader)
          Deprecated. The classLoader has to be defined when creating the KieContainer, so the one passed here will be just ignored
 KieBuilder newKieBuilder(File rootFolder)
          Creates a new KieBuilder to build the KieModule contained in the given folder
 KieBuilder newKieBuilder(KieFileSystem kieFileSystem)
          Creates a new KieBuilder to build the KieModule contained in the given KieFileSystem
 KieContainer newKieClasspathContainer()
          Creates a new KieContainer for the classpath, regardless if there's already an existing one
 KieContainer newKieClasspathContainer(ClassLoader classLoader)
          Creates a new KieContainer for the classpath using the given classLoader, regardless if there's already an existing one
 KieContainer newKieContainer(ReleaseId releaseId)
          Creates a new KieContainer wrapping the KieModule with the given ReleaseId
 KieFileSystem newKieFileSystem()
          Creates a new KieFileSystem used to programmatically define the resources composing a KieModule
 KieModuleModel newKieModuleModel()
          Creates a new KieModuleModel to programmatically define a KieModule
 KieScanner newKieScanner(KieContainer kieContainer)
          Creates a KieScanner to automatically discover if there are new releases of the KieModule (and its dependencies) wrapped by the given KieContainer
 KieSessionConfiguration newKieSessionConfiguration()
          Create a KieSessionConfiguration on which properties can be set.
 KieSessionConfiguration newKieSessionConfiguration(Properties properties)
          Create a KieSessionConfiguration on which properties can be set.
 ReleaseId newReleaseId(String groupId, String artifactId, String version)
          Creates a new ReleaseId with the given groupId, artifactId and version
 

Method Detail

getResources

KieResources getResources()
Returns the KieResources, a factory that provides Resource implementations for the desired IO resource

Returns:
resources

getRepository

KieRepository getRepository()
Returns the KieRepository, a singleton acting as a repository for all the available KieModules

Returns:
repository

getCommands

KieCommands getCommands()
Returns the KieCommands, a factory for Commands

Returns:
commands

getMarshallers

KieMarshallers getMarshallers()
Returns the KieMarshallers service

Returns:
marshallers

getLoggers

KieLoggers getLoggers()
Returns KieLoggers, a factory for KieRuntimeLogger

Returns:
loggers

getStoreServices

KieStoreServices getStoreServices()
Returns KieStoreServices

Returns:
store services

getKieClasspathContainer

KieContainer getKieClasspathContainer()
Returns KieContainer for the classpath, this a global singleton

Returns:
kie classpath container

getKieClasspathContainer

KieContainer getKieClasspathContainer(ClassLoader classLoader)
Returns KieContainer for the classpath using the given classLoader, this a global singleton

Parameters:
classLoader - classLoader
Returns:
kie classpath container #throw IllegalStateException if this method get called twice with 2 different ClassLoaders

newKieClasspathContainer

KieContainer newKieClasspathContainer()
Creates a new KieContainer for the classpath, regardless if there's already an existing one

Returns:
new kie classpath container

newKieClasspathContainer

KieContainer newKieClasspathContainer(ClassLoader classLoader)
Creates a new KieContainer for the classpath using the given classLoader, regardless if there's already an existing one

Parameters:
classLoader - classLoader
Returns:
new kie classpath container

newKieContainer

KieContainer newKieContainer(ReleaseId releaseId)
Creates a new KieContainer wrapping the KieModule with the given ReleaseId

Parameters:
releaseId - releaseId
Returns:
new kie container

newKieScanner

KieScanner newKieScanner(KieContainer kieContainer)
Creates a KieScanner to automatically discover if there are new releases of the KieModule (and its dependencies) wrapped by the given KieContainer

Parameters:
kieContainer - kieContainer
Returns:
new kie scanner

newKieBuilder

KieBuilder newKieBuilder(File rootFolder)
Creates a new KieBuilder to build the KieModule contained in the given folder

Parameters:
rootFolder - rootFolder
Returns:
new kie builder

newKieBuilder

KieBuilder newKieBuilder(KieFileSystem kieFileSystem)
Creates a new KieBuilder to build the KieModule contained in the given KieFileSystem

Returns:
new kie builder

newReleaseId

ReleaseId newReleaseId(String groupId,
                       String artifactId,
                       String version)
Creates a new ReleaseId with the given groupId, artifactId and version

Parameters:
groupId - groupId
artifactId - artifactId
version - version
Returns:
new release id

newKieFileSystem

KieFileSystem newKieFileSystem()
Creates a new KieFileSystem used to programmatically define the resources composing a KieModule

Returns:
new kie file system

newKieModuleModel

KieModuleModel newKieModuleModel()
Creates a new KieModuleModel to programmatically define a KieModule

Returns:
new kie module model

newKieBaseConfiguration

KieBaseConfiguration newKieBaseConfiguration()
Create a KieBaseConfiguration on which properties can be set.

Returns:
new kiebase configuration

newKieBaseConfiguration

KieBaseConfiguration newKieBaseConfiguration(Properties properties)
Create a KieBaseConfiguration on which properties can be set. Use the given properties file.

Parameters:
properties - properties
Returns:
new kiebase configuration

newKieBaseConfiguration

KieBaseConfiguration newKieBaseConfiguration(Properties properties,
                                             ClassLoader classLoader)
Deprecated. The classLoader has to be defined when creating the KieContainer, so the one passed here will be just ignored

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

Parameters:
properties - properties
classLoader - classLoader
Returns:
new kiebase configuration

newKieSessionConfiguration

KieSessionConfiguration newKieSessionConfiguration()
Create a KieSessionConfiguration on which properties can be set.

Returns:
new kiesession configuration

newKieSessionConfiguration

KieSessionConfiguration newKieSessionConfiguration(Properties properties)
Create a KieSessionConfiguration on which properties can be set.

Parameters:
properties - properties
Returns:
new kiesession configuration

newEnvironment

Environment newEnvironment()
Instantiate and return an Environment

Returns:
The Environment

KIE API 6.2.0.Beta1

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