Package org.kie.spring.factorybeans
Class RuntimeManagerFactoryBean
- java.lang.Object
-
- org.kie.spring.factorybeans.RuntimeManagerFactoryBean
-
- All Implemented Interfaces:
org.springframework.beans.factory.Aware,org.springframework.beans.factory.FactoryBean,org.springframework.beans.factory.InitializingBean,org.springframework.context.ApplicationContextAware
public class RuntimeManagerFactoryBean extends Object implements org.springframework.beans.factory.FactoryBean, org.springframework.beans.factory.InitializingBean, org.springframework.context.ApplicationContextAware
FactoryBean responsible to create instances ofRuntimeManagerof given type based on provided runtimeEnvironment (which is a mandatory property). Supported types:- SINGLETON
- PER_REQUEST
- PER_PROCESS_INSTANCE
Every runtime manager must be uniquely identified thusidentifieris a mandatory property.
All instances created by this factory are cached to be able to properly dispose them using destroy method (close()).
-
-
Constructor Summary
Constructors Constructor Description RuntimeManagerFactoryBean()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidafterPropertiesSet()voidclose()protected voiddisallowSharedTaskService(org.kie.api.runtime.manager.RuntimeEnvironment environment)StringgetIdentifier()ObjectgetObject()Class<?>getObjectType()org.kie.api.runtime.manager.RuntimeEnvironmentgetRuntimeEnvironment()StringgetType()booleanisSingleton()voidsetApplicationContext(org.springframework.context.ApplicationContext applicationContext)voidsetIdentifier(String identifier)voidsetRuntimeEnvironment(org.kie.api.runtime.manager.RuntimeEnvironment runtimeEnvironment)voidsetType(String type)
-
-
-
Method Detail
-
getObject
public Object getObject() throws Exception
- Specified by:
getObjectin interfaceorg.springframework.beans.factory.FactoryBean- Throws:
Exception
-
getObjectType
public Class<?> getObjectType()
- Specified by:
getObjectTypein interfaceorg.springframework.beans.factory.FactoryBean
-
isSingleton
public boolean isSingleton()
- Specified by:
isSingletonin interfaceorg.springframework.beans.factory.FactoryBean
-
afterPropertiesSet
public void afterPropertiesSet() throws Exception- Specified by:
afterPropertiesSetin interfaceorg.springframework.beans.factory.InitializingBean- Throws:
Exception
-
getRuntimeEnvironment
public org.kie.api.runtime.manager.RuntimeEnvironment getRuntimeEnvironment()
-
setRuntimeEnvironment
public void setRuntimeEnvironment(org.kie.api.runtime.manager.RuntimeEnvironment runtimeEnvironment)
-
getIdentifier
public String getIdentifier()
-
setIdentifier
public void setIdentifier(String identifier)
-
getType
public String getType()
-
setType
public void setType(String type)
-
close
public void close()
-
setApplicationContext
public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext) throws org.springframework.beans.BeansException- Specified by:
setApplicationContextin interfaceorg.springframework.context.ApplicationContextAware- Throws:
org.springframework.beans.BeansException
-
disallowSharedTaskService
protected void disallowSharedTaskService(org.kie.api.runtime.manager.RuntimeEnvironment environment)
-
-