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.
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 |
registry
protected org.kie.internal.runtime.manager.RuntimeManagerRegistry registry
environment
protected RuntimeEnvironment environment
deploymentDescriptor
protected org.kie.internal.runtime.conf.DeploymentDescriptor deploymentDescriptor
cacheManager
protected org.kie.internal.runtime.manager.CacheManager cacheManager
engineInitEager
protected boolean engineInitEager
identifier
protected String identifier
closed
protected boolean closed
securityManager
protected org.kie.internal.runtime.manager.SecurityManager securityManager
AbstractRuntimeManager
public AbstractRuntimeManager(RuntimeEnvironment environment,
String identifier)
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)
isClosed
public boolean isClosed()
- Specified by:
isClosed
in interface org.kie.internal.runtime.manager.InternalRuntimeManager
close
public void close()
- Description copied from interface:
RuntimeManager
- Closes
RuntimeManager
and releases it's resources. Shall always be called when
runtime manager is not needed any more. Otherwise it will still be active and operational.
- Specified by:
close
in interface RuntimeManager
close
public void close(boolean removeJobs)
getEnvironment
public org.kie.internal.runtime.manager.RuntimeEnvironment getEnvironment()
- Specified by:
getEnvironment
in interface org.kie.internal.runtime.manager.InternalRuntimeManager
setEnvironment
public void setEnvironment(RuntimeEnvironment environment)
getIdentifier
public String getIdentifier()
- Description copied from interface:
RuntimeManager
- Unique identifier of the
RuntimeManager
- Specified by:
getIdentifier
in interface RuntimeManager
- Returns:
setIdentifier
public void setIdentifier(String identifier)
configureRuntimeOnTaskService
protected void configureRuntimeOnTaskService(org.kie.internal.task.api.InternalTaskService internalTaskService,
RuntimeEngine engine)
removeRuntimeFromTaskService
protected void removeRuntimeFromTaskService(org.kie.internal.task.api.InternalTaskService internalTaskService)
canDestroy
protected boolean canDestroy(RuntimeEngine runtime)
hasEnvironmentEntry
protected boolean hasEnvironmentEntry(String name,
Object value)
getTransactionManager
protected org.drools.persistence.TransactionManager getTransactionManager(Environment env)
getDeploymentDescriptor
public org.kie.internal.runtime.conf.DeploymentDescriptor getDeploymentDescriptor()
- Specified by:
getDeploymentDescriptor
in interface org.kie.internal.runtime.manager.InternalRuntimeManager
setDeploymentDescriptor
public void setDeploymentDescriptor(org.kie.internal.runtime.conf.DeploymentDescriptor deploymentDescriptor)
- Specified by:
setDeploymentDescriptor
in interface org.kie.internal.runtime.manager.InternalRuntimeManager
setSecurityManager
public void setSecurityManager(org.kie.internal.runtime.manager.SecurityManager securityManager)
- Specified by:
setSecurityManager
in interface org.kie.internal.runtime.manager.InternalRuntimeManager
checkPermission
protected void checkPermission()
setCacheManager
public void setCacheManager(org.kie.internal.runtime.manager.CacheManager cacheManager)
- Specified by:
setCacheManager
in interface org.kie.internal.runtime.manager.InternalRuntimeManager
getCacheManager
public org.kie.internal.runtime.manager.CacheManager getCacheManager()
- Specified by:
getCacheManager
in interface org.kie.internal.runtime.manager.InternalRuntimeManager
Copyright © 2001-2014 JBoss by Red Hat. All Rights Reserved.