Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| jBPM distribution 6.2.0.CR2
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jbpm.runtime.manager.impl
Class RuntimeManagerFactoryImpl

    java.lang.Object
      org.jbpm.runtime.manager.impl.RuntimeManagerFactoryImpl

All Implemented Interfaces:
  RuntimeManagerFactory

Direct Known Subclasses:
  RuntimeManagerFactoryCDIImpl

    public class RuntimeManagerFactoryImpl

extends Object
implements RuntimeManagerFactory

This is the main entry point class for the 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 an injected bean for other beans that might be interested in creating `RuntimeManager` instances on demand.
This factory will try to discover several services before building RuntimeManager:

- SessionFactory - depending if persistence is enabled will select appropriate instance
- TaskServiceFactory - depending if TaskServiceFactory gets injected will select appropriate instance
- TimerService - depending if `SchedulerService` is given will create `GlobalTimerService`

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)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| jBPM distribution 6.2.0.CR2
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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