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

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

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

All Implemented Interfaces:
  RuntimeManager, org.kie.internal.runtime.manager.InternalRuntimeManager

Direct Known Subclasses:
  PerProcessInstanceRuntimeManager, PerRequestRuntimeManager, SingletonRuntimeManager

    public abstract class AbstractRuntimeManager

extends Object
implements org.kie.internal.runtime.manager.InternalRuntimeManager

Common implementation that all `RuntimeManager` implementation should inherit from. Provides following capabilities:

- keeps track of all active managers by its identifier and prevents of having multiple managers with same id
- provides common close operation
- injects RuntimeManager into ksession's environment for further reference
- registers dispose callbacks (via transaction synchronization) to dispose runtime engine automatically on transaction completion
- registers all defined items (work item handlers, event listeners)

Additionally, provides abstract `init` method that will be called on RuntimeManager instantiation.

Field Summary
`protected static List<String>` | `activeManagers`
`protected org.kie.internal.runtime.manager.RuntimeEnvironment` | `environment`
`protected String` | `identifier`

Constructor Summary
`AbstractRuntimeManager(org.kie.internal.runtime.manager.RuntimeEnvironment environment, String identifier)`

Method Summary
`protected void` | `attachManager(RuntimeEngine runtime)`
`protected boolean` | `canDestroy()`
`void` | `close()`
`protected void` | `configureRuntimeOnTaskService(org.kie.internal.task.api.InternalTaskService internalTaskService)`
`org.kie.internal.runtime.manager.RuntimeEnvironment` | `getEnvironment()`
`String` | `getIdentifier()`
`abstract void` | `init()`
`protected void` | `registerDisposeCallback(RuntimeEngine runtime, org.drools.persistence.TransactionSynchronization sync)`
`protected void` | `registerItems(RuntimeEngine runtime)`
`protected void` | `removeRuntimeFromTaskService(org.kie.internal.task.api.InternalTaskService internalTaskService)`
`void` | `setEnvironment(org.kie.internal.runtime.manager.RuntimeEnvironment environment)`
`void` | `setIdentifier(String identifier)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Methods inherited from interface org.kie.internal.runtime.manager.InternalRuntimeManager
`validate`

Methods inherited from interface org.kie.api.runtime.manager.RuntimeManager
`disposeRuntimeEngine, getRuntimeEngine`

Field Detail

### activeManagers

    protected static volatile List<String> activeManagers

### environment

    protected org.kie.internal.runtime.manager.RuntimeEnvironment environment

### identifier

    protected String identifier

Constructor Detail

### AbstractRuntimeManager

    public AbstractRuntimeManager(org.kie.internal.runtime.manager.RuntimeEnvironment environment,
                                  String identifier)

Method Detail

### init

    public abstract void init()

### registerItems

    protected void registerItems(RuntimeEngine runtime)

### registerDisposeCallback

    protected void registerDisposeCallback(RuntimeEngine runtime,
                                           org.drools.persistence.TransactionSynchronization sync)

### attachManager

    protected void attachManager(RuntimeEngine runtime)

### close

    public void close()

  Specified by:
    `close` in interface `RuntimeManager`

### getEnvironment

    public org.kie.internal.runtime.manager.RuntimeEnvironment getEnvironment()

  Specified by:
    `getEnvironment` in interface `org.kie.internal.runtime.manager.InternalRuntimeManager`

### setEnvironment

    public void setEnvironment(org.kie.internal.runtime.manager.RuntimeEnvironment environment)

### getIdentifier

    public String getIdentifier()

  Specified by:
    `getIdentifier` in interface `RuntimeManager`

### setIdentifier

    public void setIdentifier(String identifier)

### configureRuntimeOnTaskService

    protected void configureRuntimeOnTaskService(org.kie.internal.task.api.InternalTaskService internalTaskService)

### removeRuntimeFromTaskService

    protected void removeRuntimeFromTaskService(org.kie.internal.task.api.InternalTaskService internalTaskService)

### canDestroy

    protected boolean canDestroy()

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

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