Class MscRuntimeContainerDelegate
- java.lang.Object
-
- org.camunda.bpm.container.impl.jboss.service.MscRuntimeContainerDelegate
-
- All Implemented Interfaces:
RuntimeContainerDelegate
,ProcessApplicationService
,ProcessEngineService
,org.jboss.msc.Service
,org.jboss.msc.service.Service<MscRuntimeContainerDelegate>
,org.jboss.msc.value.Value<MscRuntimeContainerDelegate>
public class MscRuntimeContainerDelegate extends java.lang.Object implements org.jboss.msc.service.Service<MscRuntimeContainerDelegate>, RuntimeContainerDelegate, ProcessEngineService, ProcessApplicationService
A
RuntimeContainerDelegate
implementation for JBoss AS 7- Author:
- Daniel Meyer
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.camunda.bpm.container.RuntimeContainerDelegate
RuntimeContainerDelegate.RuntimeContainerDelegateInstance
-
-
Field Summary
Fields Modifier and Type Field Description protected org.jboss.msc.service.ServiceTarget
childTarget
protected java.util.Set<MscManagedProcessApplication>
processApplications
protected ServiceTracker<MscManagedProcessApplication>
processApplicationServiceTracker
protected java.util.Set<ProcessEngine>
processEngines
protected ServiceTracker<ProcessEngine>
processEngineServiceTracker
protected org.jboss.msc.service.ServiceContainer
serviceContainer
-
Fields inherited from interface org.camunda.bpm.container.RuntimeContainerDelegate
INSTANCE
-
-
Constructor Summary
Constructors Constructor Description MscRuntimeContainerDelegate()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
createJndiBindings()
protected void
createProcessEngineServiceJndiBindings()
void
deployProcessApplication(AbstractProcessApplication processApplication)
Deploy aAbstractProcessApplication
into the runtime container.protected void
deployServletProcessApplication(ServletProcessApplication processApplication)
ProcessEngine
getDefaultProcessEngine()
ProcessApplicationReference
getDeployedProcessApplication(java.lang.String name)
ExecutorService
getExecutorService()
protected MscManagedProcessApplication
getManagedProcessApplication(java.lang.String name)
ProcessApplicationInfo
getProcessApplicationInfo(java.lang.String processApplicationName)
Provides information about a deployed process applicationjava.util.Set<java.lang.String>
getProcessApplicationNames()
ProcessApplicationService
getProcessApplicationService()
ProcessEngine
getProcessEngine(java.lang.String name)
java.util.Set<java.lang.String>
getProcessEngineNames()
java.util.List<ProcessEngine>
getProcessEngines()
ProcessEngineService
getProcessEngineService()
protected ProcessEngine
getProcessEngineService(org.jboss.msc.service.ServiceName processEngineServiceName)
protected org.jboss.msc.service.ServiceController<ProcessEngine>
getProcessEngineServiceController(org.jboss.msc.service.ServiceName processEngineServiceName)
MscRuntimeContainerDelegate
getValue()
void
processEngineStarted(ProcessEngine processEngine)
invoked by theMscManagedProcessEngine
andMscManagedProcessEngineController
when a process engine is startedvoid
processEngineStopped(ProcessEngine processEngine)
invoked by theMscManagedProcessEngine
andMscManagedProcessEngineController
when a process engine is stoppedvoid
registerProcessEngine(ProcessEngine processEngine)
Adds a managedProcessEngine
to the runtime container.void
start(org.jboss.msc.service.StartContext context)
protected void
startTrackingServices()
void
stop(org.jboss.msc.service.StopContext context)
protected void
stopTrackingServices()
void
undeployProcessApplication(AbstractProcessApplication processApplication)
Undeploy aAbstractProcessApplication
from the runtime container.void
unregisterProcessEngine(ProcessEngine processEngine)
Unregisters a managedProcessEngine
instance from the Runtime Container.
-
-
-
Field Detail
-
childTarget
protected org.jboss.msc.service.ServiceTarget childTarget
-
serviceContainer
protected org.jboss.msc.service.ServiceContainer serviceContainer
-
processEngineServiceTracker
protected ServiceTracker<ProcessEngine> processEngineServiceTracker
-
processEngines
protected java.util.Set<ProcessEngine> processEngines
-
processApplicationServiceTracker
protected ServiceTracker<MscManagedProcessApplication> processApplicationServiceTracker
-
processApplications
protected java.util.Set<MscManagedProcessApplication> processApplications
-
-
Method Detail
-
start
public void start(org.jboss.msc.service.StartContext context) throws org.jboss.msc.service.StartException
- Specified by:
start
in interfaceorg.jboss.msc.Service
- Specified by:
start
in interfaceorg.jboss.msc.service.Service<MscRuntimeContainerDelegate>
- Throws:
org.jboss.msc.service.StartException
-
stop
public void stop(org.jboss.msc.service.StopContext context)
- Specified by:
stop
in interfaceorg.jboss.msc.Service
- Specified by:
stop
in interfaceorg.jboss.msc.service.Service<MscRuntimeContainerDelegate>
-
getValue
public MscRuntimeContainerDelegate getValue() throws java.lang.IllegalStateException, java.lang.IllegalArgumentException
- Specified by:
getValue
in interfaceorg.jboss.msc.value.Value<MscRuntimeContainerDelegate>
- Throws:
java.lang.IllegalStateException
java.lang.IllegalArgumentException
-
registerProcessEngine
public void registerProcessEngine(ProcessEngine processEngine)
Description copied from interface:RuntimeContainerDelegate
Adds a managed
ProcessEngine
to the runtime container.Process Engines registered through this method are returned by the
ProcessEngineService
.- Specified by:
registerProcessEngine
in interfaceRuntimeContainerDelegate
-
unregisterProcessEngine
public void unregisterProcessEngine(ProcessEngine processEngine)
Description copied from interface:RuntimeContainerDelegate
Unregisters a managed
ProcessEngine
instance from the Runtime Container.- Specified by:
unregisterProcessEngine
in interfaceRuntimeContainerDelegate
-
deployProcessApplication
public void deployProcessApplication(AbstractProcessApplication processApplication)
Description copied from interface:RuntimeContainerDelegate
Deploy aAbstractProcessApplication
into the runtime container.- Specified by:
deployProcessApplication
in interfaceRuntimeContainerDelegate
-
deployServletProcessApplication
protected void deployServletProcessApplication(ServletProcessApplication processApplication)
-
undeployProcessApplication
public void undeployProcessApplication(AbstractProcessApplication processApplication)
Description copied from interface:RuntimeContainerDelegate
Undeploy aAbstractProcessApplication
from the runtime container.- Specified by:
undeployProcessApplication
in interfaceRuntimeContainerDelegate
-
getProcessEngineService
public ProcessEngineService getProcessEngineService()
- Specified by:
getProcessEngineService
in interfaceRuntimeContainerDelegate
- Returns:
- the Container's
ProcessEngineService
implementation.
-
getProcessApplicationService
public ProcessApplicationService getProcessApplicationService()
- Specified by:
getProcessApplicationService
in interfaceRuntimeContainerDelegate
- Returns:
- the Container's
ProcessApplicationService
implementation
-
getExecutorService
public ExecutorService getExecutorService()
- Specified by:
getExecutorService
in interfaceRuntimeContainerDelegate
- Returns:
- the Runtime Container's
ExecutorService
implementation
-
getDefaultProcessEngine
public ProcessEngine getDefaultProcessEngine()
- Specified by:
getDefaultProcessEngine
in interfaceProcessEngineService
- Returns:
- the default process engine.
-
getProcessEngines
public java.util.List<ProcessEngine> getProcessEngines()
- Specified by:
getProcessEngines
in interfaceProcessEngineService
- Returns:
- all
ProcessEngines
managed by the Camunda Platform.
-
getProcessEngineNames
public java.util.Set<java.lang.String> getProcessEngineNames()
- Specified by:
getProcessEngineNames
in interfaceProcessEngineService
- Returns:
- the names of all
ProcessEngines
managed by the Camunda Platform.
-
getProcessEngine
public ProcessEngine getProcessEngine(java.lang.String name)
- Specified by:
getProcessEngine
in interfaceProcessEngineService
- Returns:
- the
ProcessEngine
for the given name or null if no such process engine exists.
-
getProcessApplicationInfo
public ProcessApplicationInfo getProcessApplicationInfo(java.lang.String processApplicationName)
Description copied from interface:ProcessApplicationService
Provides information about a deployed process application
- Specified by:
getProcessApplicationInfo
in interfaceProcessApplicationService
- Returns:
- the
ProcessApplicationInfo
object or null if no such process application is deployed.
-
getProcessApplicationNames
public java.util.Set<java.lang.String> getProcessApplicationNames()
- Specified by:
getProcessApplicationNames
in interfaceProcessApplicationService
-
getDeployedProcessApplication
public ProcessApplicationReference getDeployedProcessApplication(java.lang.String name)
- Specified by:
getDeployedProcessApplication
in interfaceRuntimeContainerDelegate
- Returns:
- a reference to the process application with the given name if deployed; null otherwise
-
createProcessEngineServiceJndiBindings
protected void createProcessEngineServiceJndiBindings()
-
createJndiBindings
protected void createJndiBindings()
-
getProcessEngineService
protected ProcessEngine getProcessEngineService(org.jboss.msc.service.ServiceName processEngineServiceName)
-
getProcessEngineServiceController
protected org.jboss.msc.service.ServiceController<ProcessEngine> getProcessEngineServiceController(org.jboss.msc.service.ServiceName processEngineServiceName)
-
startTrackingServices
protected void startTrackingServices()
-
stopTrackingServices
protected void stopTrackingServices()
-
processEngineStarted
public void processEngineStarted(ProcessEngine processEngine)
invoked by the
MscManagedProcessEngine
andMscManagedProcessEngineController
when a process engine is started
-
processEngineStopped
public void processEngineStopped(ProcessEngine processEngine)
invoked by the
MscManagedProcessEngine
andMscManagedProcessEngineController
when a process engine is stopped
-
getManagedProcessApplication
protected MscManagedProcessApplication getManagedProcessApplication(java.lang.String name)
-
-