jBPM distribution 6.1.0.Beta4

org.jbpm.runtime.manager.impl
Class RuntimeManagerFactoryImpl

java.lang.Object
  extended by org.jbpm.runtime.manager.impl.RuntimeManagerFactoryImpl
All Implemented Interfaces:
RuntimeManagerFactory

@ApplicationScoped
public class RuntimeManagerFactoryImpl
extends Object
implements RuntimeManagerFactory

Main entry point class for RuntimeManager module responsible for delivering RuntimeManager instances based on given RuntimeEnvironment.
It can be used in both CDI and non CDI environments although it does not produce RuntimeManager instance for CDI automatically but would be more used as injection to other beans that might be interested in creating RuntimeManager instances on demand.
This factory will try to discover several services before building RuntimeManager:


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.kie.api.runtime.manager.RuntimeManagerFactory
RuntimeManagerFactory.Factory
 
Constructor Summary
RuntimeManagerFactoryImpl()
           
 
Method Summary
protected  org.kie.internal.runtime.manager.SessionFactory getSessionFactory(RuntimeEnvironment environment)
           
protected  org.kie.internal.runtime.manager.TaskServiceFactory getTaskServiceFactory(RuntimeEnvironment environment)
           
protected  void initTimerService(RuntimeEnvironment environment, RuntimeManager manager)
           
 RuntimeManager newPerProcessInstanceRuntimeManager(RuntimeEnvironment environment)
          Produces new instance of per process instance RuntimeManager with default identifier.
 RuntimeManager newPerProcessInstanceRuntimeManager(RuntimeEnvironment environment, String identifier)
          Produces new instance of per process instance RuntimeManager with custom identifier.
 RuntimeManager newPerRequestRuntimeManager(RuntimeEnvironment environment)
          Produces new instance of per request RuntimeManager with default identifier.
 RuntimeManager newPerRequestRuntimeManager(RuntimeEnvironment environment, String identifier)
          Produces new instance of per request RuntimeManager with custom identifier.
 RuntimeManager newSingletonRuntimeManager(RuntimeEnvironment environment)
          Produces new instance of singleton RuntimeManager with default identifier.
 RuntimeManager newSingletonRuntimeManager(RuntimeEnvironment environment, String identifier)
          Produces new instance of singleton RuntimeManager with custom identifier.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RuntimeManagerFactoryImpl

public RuntimeManagerFactoryImpl()
Method Detail

newSingletonRuntimeManager

public RuntimeManager newSingletonRuntimeManager(RuntimeEnvironment environment)
Description copied from interface: RuntimeManagerFactory
Produces new instance of singleton RuntimeManager with default identifier. Since it relies on default identifier it can only be invoked once unless previously produced manager is closed. Otherwise error will be thrown indicating that managers must be identifier uniquely.

Specified by:
newSingletonRuntimeManager in interface RuntimeManagerFactory
Parameters:
environment - environment instance for the new runtime manager
Returns:
new instance of RuntimeManager

newSingletonRuntimeManager

public RuntimeManager newSingletonRuntimeManager(RuntimeEnvironment environment,
                                                 String identifier)
Description copied from interface: RuntimeManagerFactory
Produces new instance of singleton RuntimeManager with custom identifier. In case the given identifier is already in use error will be thrown indicating that managers must be identifier uniquely.

Specified by:
newSingletonRuntimeManager in interface RuntimeManagerFactory
Parameters:
environment - environment instance for the new runtime manager
identifier - custom identifier for the manager

newPerRequestRuntimeManager

public RuntimeManager newPerRequestRuntimeManager(RuntimeEnvironment environment)
Description copied from interface: RuntimeManagerFactory
Produces new instance of per request RuntimeManager with default identifier. Since it relies on default identifier it can only be invoked once unless previously produced manager is closed. Otherwise error will be thrown indicating that managers must be identifier uniquely.

Specified by:
newPerRequestRuntimeManager in interface RuntimeManagerFactory
Parameters:
environment - environment instance for the new runtime manager
Returns:
new instance of RuntimeManager

newPerRequestRuntimeManager

public RuntimeManager newPerRequestRuntimeManager(RuntimeEnvironment environment,
                                                  String identifier)
Description copied from interface: RuntimeManagerFactory
Produces new instance of per request RuntimeManager with custom identifier. In case the given identifier is already in use error will be thrown indicating that managers must be identifier uniquely.

Specified by:
newPerRequestRuntimeManager in interface RuntimeManagerFactory
Parameters:
environment - environment instance for the new runtime manager
identifier - custom identifier for the manager

newPerProcessInstanceRuntimeManager

public RuntimeManager newPerProcessInstanceRuntimeManager(RuntimeEnvironment environment)
Description copied from interface: RuntimeManagerFactory
Produces new instance of per process instance RuntimeManager with default identifier. Since it relies on default identifier it can only be invoked once unless previously produced manager is closed. Otherwise error will be thrown indicating that managers must be identifier uniquely.

Specified by:
newPerProcessInstanceRuntimeManager in interface RuntimeManagerFactory
Parameters:
environment - environment instance for the new runtime manager
Returns:
new instance of RuntimeManager

newPerProcessInstanceRuntimeManager

public RuntimeManager newPerProcessInstanceRuntimeManager(RuntimeEnvironment environment,
                                                          String identifier)
Description copied from interface: RuntimeManagerFactory
Produces new instance of per process instance RuntimeManager with custom identifier. In case the given identifier is already in use error will be thrown indicating that managers must be identifier uniquely.

Specified by:
newPerProcessInstanceRuntimeManager in interface RuntimeManagerFactory
Parameters:
environment - environment instance for the new runtime manager
identifier - custom identifier for the manager

getSessionFactory

protected org.kie.internal.runtime.manager.SessionFactory getSessionFactory(RuntimeEnvironment environment)

getTaskServiceFactory

protected org.kie.internal.runtime.manager.TaskServiceFactory getTaskServiceFactory(RuntimeEnvironment environment)

initTimerService

protected void initTimerService(RuntimeEnvironment environment,
                                RuntimeManager manager)

jBPM distribution 6.1.0.Beta4

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