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();
Modifier and Type | Interface and Description |
---|---|
static class |
KieServices.Factory
A Factory for this KieServices
|
Modifier and Type | Method and Description |
---|---|
static KieServices |
get()
Returns a reference to the KieServices singleton
|
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.
|
KieContainer |
getKieClasspathContainer(String containerId)
Returns KieContainer for the classpath enforcing the given containerId,
this a global singleton.
|
KieContainer |
getKieClasspathContainer(String containerId,
ClassLoader classLoader)
Returns KieContainer for the classpath enforcing the given containerId and 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
|
KieBuilder |
newKieBuilder(KieFileSystem kieFileSystem,
ClassLoader classLoader)
Creates a new KieBuilder to build the KieModule contained in the given KieFileSystem
and using the given class loader
|
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 |
newKieClasspathContainer(String containerId)
Creates a new KieContainer for the classpath,
regardless if there's already an existing one,
enforcing the given containerId.
|
KieContainer |
newKieClasspathContainer(String containerId,
ClassLoader classLoader)
Creates a new KieContainer for the classpath using the given classLoader,
regardless if there's already an existing one,
enforcing the given containerId.
|
KieContainer |
newKieContainer(ReleaseId releaseId)
Creates a new KieContainer wrapping the KieModule with the given ReleaseId
|
KieContainer |
newKieContainer(ReleaseId releaseId,
ClassLoader classLoader)
Creates a new KieContainer wrapping the KieModule with the given ReleaseId
and using the given class loader
|
KieContainer |
newKieContainer(String containerId,
ReleaseId releaseId)
Creates a new KieContainer wrapping the KieModule with the given ReleaseId
and enforcing the given containerId.
|
KieContainer |
newKieContainer(String containerId,
ReleaseId releaseId,
ClassLoader classLoader)
Creates a new KieContainer wrapping the KieModule with the given ReleaseId,
using the given class loader
and enforcing the given containerId.
|
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.
|
KieSessionConfiguration |
newKieSessionConfiguration(Properties properties,
ClassLoader classLoader)
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
|
KieResources getResources()
KieRepository getRepository()
KieCommands getCommands()
KieMarshallers getMarshallers()
KieLoggers getLoggers()
KieStoreServices getStoreServices()
KieContainer getKieClasspathContainer()
KieContainer getKieClasspathContainer(ClassLoader classLoader)
classLoader
- classLoaderIllegalStateException
- if this method get called twice with 2 different ClassLoadersKieContainer getKieClasspathContainer(String containerId)
If enforcing the containerId is successful, the KieContainer and its containerId are registered within the KieServices.
Deregistration can be performed by calling KieContainer.dispose()
on the resulting KieContainer.
If you do not want to enforce a specific containerId, use the getKieClasspathContainer()
method instead.
containerId
- the containerId to enforce (non-null).IllegalStateException
- if the containerId is already existing for another container and therefore cannot be enforced.KieContainer getKieClasspathContainer(String containerId, ClassLoader classLoader)
If enforcing the containerId is successful, the KieContainer and its containerId are registered within the KieServices.
Deregistration can be performed by calling KieContainer.dispose()
on the resulting KieContainer.
containerId
- the containerId to enforce (non-null).classLoader
- classLoaderIllegalStateException
- if this method get called twice with 2 different ClassLoaders, or if the containerId is already existing for another container and therefore cannot be enforced.KieContainer newKieClasspathContainer()
KieContainer newKieClasspathContainer(ClassLoader classLoader)
classLoader
- classLoaderKieContainer newKieClasspathContainer(String containerId)
If enforcing the containerId is successful, the KieContainer and its containerId are registered within the KieServices.
Deregistration can be performed by calling KieContainer.dispose()
on the resulting KieContainer.
If you do not want to enforce a specific containerId, use the newKieClasspathContainer()
method instead.
containerId
- a unique containerId (non-null).IllegalStateException
- if the containerId is already existing for another container, and therefore cannot be enforced.KieContainer newKieClasspathContainer(String containerId, ClassLoader classLoader)
If enforcing the containerId is successful, the KieContainer and its containerId are registered within the KieServices.
Deregistration can be performed by calling KieContainer.dispose()
on the resulting KieContainer.
containerId
- a unique containerId (non-null).classLoader
- classLoaderIllegalStateException
- if the containerId is already existing for another container, and therefore cannot be enforced.KieContainer newKieContainer(ReleaseId releaseId)
releaseId
- releaseIdKieContainer newKieContainer(String containerId, ReleaseId releaseId)
If enforcing the containerId is successful, the KieContainer and its containerId are registered within the KieServices.
Deregistration can be performed by calling KieContainer.dispose()
on the resulting KieContainer.
If you do not want to enforce a specific containerId, use the newKieContainer(ReleaseId)
method instead.
containerId
- a unique containerId (non-null).releaseId
- releaseIdIllegalStateException
- if the containerId is already existing for another container, and therefore cannot be enforced.KieContainer newKieContainer(ReleaseId releaseId, ClassLoader classLoader)
releaseId
- releaseIdclassLoader
- classLoaderKieContainer newKieContainer(String containerId, ReleaseId releaseId, ClassLoader classLoader)
If enforcing the containerId is successful, the KieContainer and its containerId are registered within the KieServices.
Deregistration can be performed by calling KieContainer.dispose()
on the resulting KieContainer.
containerId
- a unique containerId (non-null).releaseId
- releaseIdclassLoader
- classLoaderIllegalStateException
- if the containerId is already existing for another container, and therefore cannot be enforced.KieScanner newKieScanner(KieContainer kieContainer)
kieContainer
- kieContainerKieBuilder newKieBuilder(File rootFolder)
rootFolder
- rootFolderKieBuilder newKieBuilder(KieFileSystem kieFileSystem)
KieBuilder newKieBuilder(KieFileSystem kieFileSystem, ClassLoader classLoader)
ReleaseId newReleaseId(String groupId, String artifactId, String version)
groupId
- groupIdartifactId
- artifactIdversion
- versionKieFileSystem newKieFileSystem()
KieModuleModel newKieModuleModel()
KieBaseConfiguration newKieBaseConfiguration()
KieBaseConfiguration newKieBaseConfiguration(Properties properties)
properties
- propertiesKieBaseConfiguration newKieBaseConfiguration(Properties properties, ClassLoader classLoader)
properties
- propertiesclassLoader
- classLoaderKieSessionConfiguration newKieSessionConfiguration()
KieSessionConfiguration newKieSessionConfiguration(Properties properties)
properties
- propertiesKieSessionConfiguration newKieSessionConfiguration(Properties properties, ClassLoader classLoader)
properties
- propertiesclassLoader
- classLoaderEnvironment newEnvironment()
static KieServices get()
Copyright © 2001–2017 JBoss by Red Hat. All rights reserved.