Kie :: Spring 6.1.0.CR2

org.kie.spring.factorybeans
Class RuntimeManagerFactoryBean

java.lang.Object
  extended by org.kie.spring.factorybeans.RuntimeManagerFactoryBean
All Implemented Interfaces:
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 of RuntimeManager of given type based on provided runtimeEnvironment (which is a mandatory property). Supported types:

where default is SINGLETON when no type is specified.
Every runtime manager must be uniquely identified thus identifier is a mandatory property.
All instances created by this factory are cached to be able to properly dispose them using destroy method (close()).


Constructor Summary
RuntimeManagerFactoryBean()
           
 
Method Summary
 void afterPropertiesSet()
           
 void close()
           
 String getIdentifier()
           
 Object getObject()
           
 Class<?> getObjectType()
           
 org.kie.api.runtime.manager.RuntimeEnvironment getRuntimeEnvironment()
           
 String getType()
           
 boolean isSingleton()
           
 void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
           
 void setIdentifier(String identifier)
           
 void setRuntimeEnvironment(org.kie.api.runtime.manager.RuntimeEnvironment runtimeEnvironment)
           
 void setType(String type)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RuntimeManagerFactoryBean

public RuntimeManagerFactoryBean()
Method Detail

getObject

public Object getObject()
                 throws Exception
Specified by:
getObject in interface org.springframework.beans.factory.FactoryBean
Throws:
Exception

getObjectType

public Class<?> getObjectType()
Specified by:
getObjectType in interface org.springframework.beans.factory.FactoryBean

isSingleton

public boolean isSingleton()
Specified by:
isSingleton in interface org.springframework.beans.factory.FactoryBean

afterPropertiesSet

public void afterPropertiesSet()
                        throws Exception
Specified by:
afterPropertiesSet in interface org.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:
setApplicationContext in interface org.springframework.context.ApplicationContextAware
Throws:
org.springframework.beans.BeansException

Kie :: Spring 6.1.0.CR2

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