|
jBPM distribution 6.1.0.Beta3 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jbpm.runtime.manager.impl.SimpleRuntimeEnvironment
public class SimpleRuntimeEnvironment
The most basic implementation of RuntimeEnvironment
that at the same time serves as base
implementation for all extensions. Encapsulates all important configuration that RuntimeManager
requires for execution.
RuntimeEnvironment
RuntimeEngine
RuntimeEngine
SchedulerProvider
it allows to get GlobalTimerService
if available
Field Summary | |
---|---|
protected ClassLoader |
classLoader
|
protected KieSessionConfiguration |
configuration
|
protected javax.persistence.EntityManagerFactory |
emf
|
protected Environment |
environment
|
protected KieBase |
kbase
|
protected org.kie.internal.builder.KnowledgeBuilder |
kbuilder
|
protected org.kie.internal.runtime.manager.Mapper |
mapper
|
protected RegisterableItemsFactory |
registerableItemsFactory
|
protected GlobalSchedulerService |
schedulerService
|
protected Properties |
sessionConfigProperties
|
protected boolean |
usePersistence
|
protected UserGroupCallback |
userGroupCallback
|
Constructor Summary | |
---|---|
SimpleRuntimeEnvironment()
|
|
SimpleRuntimeEnvironment(RegisterableItemsFactory registerableItemsFactory)
|
Method Summary | |
---|---|
void |
addAsset(Resource resource,
ResourceType type)
Adds given asset to knowledge builder to produce KieBase |
protected void |
addIfPresent(String name,
Environment copy)
|
void |
addToConfiguration(String name,
String value)
Adds configuration property that will be part of KieSessionConfiguration |
void |
addToEnvironment(String name,
Object value)
Adds element to the drools/jbpm environment - the value must be thread save as it will be shared between all RuntimeEngine instances |
void |
close()
Closes the environment allowing to close all depending components such as ksession factories, etc |
protected Environment |
copyEnvironment()
|
ClassLoader |
getClassLoader()
Delivers custom class loader that shall be used by the process engine and task service instances |
KieSessionConfiguration |
getConfiguration()
KieSession configuration that shall be used to create instances of KieSession |
javax.persistence.EntityManagerFactory |
getEmf()
|
Environment |
getEnvironment()
KieSession environment that shall be used to create instances of KieSession |
Environment |
getEnvironmentTemplate()
|
KieBase |
getKieBase()
Returns KieBase that shall be used by the manager |
org.kie.internal.runtime.manager.Mapper |
getMapper()
|
RegisterableItemsFactory |
getRegisterableItemsFactory()
Delivers concrete implementation of RegisterableItemsFactory to obtain handlers and listeners
that shall be registered on instances of KieSession |
GlobalSchedulerService |
getSchedulerService()
Returns fully configured instance of SchedulerService ready to be used/ |
Properties |
getSessionConfigProperties()
|
UserGroupCallback |
getUserGroupCallback()
Delivers concrete implementation of UserGroupCallback that shall be registered on instances
of TaskService for managing users and groups. |
void |
init()
|
void |
setClassLoader(ClassLoader classLoader)
|
void |
setEmf(javax.persistence.EntityManagerFactory emf)
|
void |
setKieBase(KieBase kbase)
|
void |
setMapper(org.kie.internal.runtime.manager.Mapper mapper)
|
void |
setRegisterableItemsFactory(RegisterableItemsFactory registerableItemsFactory)
|
void |
setSchedulerService(GlobalSchedulerService schedulerService)
|
void |
setSessionConfigProperties(Properties sessionConfigProperties)
|
void |
setUsePersistence(boolean usePersistence)
|
void |
setUserGroupCallback(UserGroupCallback userGroupCallback)
|
boolean |
usePersistence()
Indicates if persistence shall be used for the KieSession instances |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected boolean usePersistence
protected javax.persistence.EntityManagerFactory emf
protected Environment environment
protected KieSessionConfiguration configuration
protected KieBase kbase
protected org.kie.internal.builder.KnowledgeBuilder kbuilder
protected RegisterableItemsFactory registerableItemsFactory
protected org.kie.internal.runtime.manager.Mapper mapper
protected UserGroupCallback userGroupCallback
protected GlobalSchedulerService schedulerService
protected ClassLoader classLoader
protected Properties sessionConfigProperties
Constructor Detail |
---|
public SimpleRuntimeEnvironment()
public SimpleRuntimeEnvironment(RegisterableItemsFactory registerableItemsFactory)
Method Detail |
---|
public void init()
public void addAsset(Resource resource, ResourceType type)
resource
- asset to be addedtype
- type of the assetpublic void addToEnvironment(String name, Object value)
RuntimeEngine
instances
name
- name of the environment entryvalue
- value of the environment entrypublic void addToConfiguration(String name, String value)
KieSessionConfiguration
name
- name of the propertyvalue
- value of the propertypublic KieBase getKieBase()
RuntimeEnvironment
KieBase
that shall be used by the manager
getKieBase
in interface RuntimeEnvironment
public Environment getEnvironmentTemplate()
public Environment getEnvironment()
RuntimeEnvironment
KieSession
getEnvironment
in interface RuntimeEnvironment
public KieSessionConfiguration getConfiguration()
RuntimeEnvironment
KieSession
getConfiguration
in interface RuntimeEnvironment
public boolean usePersistence()
RuntimeEnvironment
usePersistence
in interface RuntimeEnvironment
public RegisterableItemsFactory getRegisterableItemsFactory()
RuntimeEnvironment
RegisterableItemsFactory
to obtain handlers and listeners
that shall be registered on instances of KieSession
getRegisterableItemsFactory
in interface RuntimeEnvironment
public void close()
RuntimeEnvironment
close
in interface RuntimeEnvironment
protected void addIfPresent(String name, Environment copy)
protected Environment copyEnvironment()
public org.kie.internal.runtime.manager.Mapper getMapper()
public UserGroupCallback getUserGroupCallback()
RuntimeEnvironment
UserGroupCallback
that shall be registered on instances
of TaskService
for managing users and groups.
getUserGroupCallback
in interface RuntimeEnvironment
public void setUserGroupCallback(UserGroupCallback userGroupCallback)
public Properties getSessionConfigProperties()
public void setSessionConfigProperties(Properties sessionConfigProperties)
public void setUsePersistence(boolean usePersistence)
public void setKieBase(KieBase kbase)
public void setMapper(org.kie.internal.runtime.manager.Mapper mapper)
public GlobalSchedulerService getSchedulerService()
SchedulerProvider
SchedulerService
ready to be used/
getSchedulerService
in interface SchedulerProvider
GlobalSchedulerService
instance configured according to environment needspublic void setSchedulerService(GlobalSchedulerService schedulerService)
public void setRegisterableItemsFactory(RegisterableItemsFactory registerableItemsFactory)
public javax.persistence.EntityManagerFactory getEmf()
public void setEmf(javax.persistence.EntityManagerFactory emf)
public ClassLoader getClassLoader()
RuntimeEnvironment
getClassLoader
in interface RuntimeEnvironment
public void setClassLoader(ClassLoader classLoader)
|
jBPM distribution 6.1.0.Beta3 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |