Class MBeanServiceContainer
- java.lang.Object
-
- org.camunda.bpm.container.impl.jmx.MBeanServiceContainer
-
- All Implemented Interfaces:
PlatformServiceContainer
public class MBeanServiceContainer extends java.lang.Object implements PlatformServiceContainer
A simple Service Container that delegates to the JVM's
MBeanServer.- Author:
- Daniel Meyer
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.camunda.bpm.container.impl.spi.PlatformServiceContainer
PlatformServiceContainer.ServiceType
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.ThreadLocal<java.util.Stack<DeploymentOperation>>activeDeploymentOperationsset if the current thread is performing a composite deployment operationprotected javax.management.MBeanServermBeanServerstatic java.lang.StringSERVICE_NAME_EXECUTORprotected java.util.Map<javax.management.ObjectName,PlatformService<?>>servicesByName
-
Constructor Summary
Constructors Constructor Description MBeanServiceContainer()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static java.lang.StringcomposeLocalName(PlatformServiceContainer.ServiceType type, java.lang.String localName)DeploymentOperation.DeploymentOperationBuildercreateDeploymentOperation(java.lang.String name)protected javax.management.MBeanServercreateOrLookupMbeanServer()DeploymentOperation.DeploymentOperationBuildercreateUndeploymentOperation(java.lang.String name)voidexecuteDeploymentOperation(DeploymentOperation operation)javax.management.MBeanServergetmBeanServer()static javax.management.ObjectNamegetObjectName(java.lang.String serviceName)<S> SgetService(javax.management.ObjectName name)get a specific service by name or null if no such Service exists.<S> SgetService(PlatformServiceContainer.ServiceType type, java.lang.String localName)get a specific service by name or null if no such Service exists.java.util.Set<java.lang.String>getServiceNames(PlatformServiceContainer.ServiceType type)<S> java.util.List<PlatformService<S>>getServicesByType(PlatformServiceContainer.ServiceType type)<S> SgetServiceValue(javax.management.ObjectName name)get the service value for a specific service by name or null if no such Service exists.<S> SgetServiceValue(PlatformServiceContainer.ServiceType type, java.lang.String localName)get the service value for a specific service by name or null if no such Service exists.<S> java.util.List<S>getServiceValuesByType(PlatformServiceContainer.ServiceType type)voidsetmBeanServer(javax.management.MBeanServer mBeanServer)<S> voidstartService(java.lang.String name, PlatformService<S> service)<S> voidstartService(PlatformServiceContainer.ServiceType serviceType, java.lang.String localName, PlatformService<S> service)voidstopService(java.lang.String name)voidstopService(PlatformServiceContainer.ServiceType serviceType, java.lang.String localName)
-
-
-
Field Detail
-
mBeanServer
protected javax.management.MBeanServer mBeanServer
-
servicesByName
protected java.util.Map<javax.management.ObjectName,PlatformService<?>> servicesByName
-
activeDeploymentOperations
protected java.lang.ThreadLocal<java.util.Stack<DeploymentOperation>> activeDeploymentOperations
set if the current thread is performing a composite deployment operation
-
SERVICE_NAME_EXECUTOR
public static final java.lang.String SERVICE_NAME_EXECUTOR
- See Also:
- Constant Field Values
-
-
Method Detail
-
startService
public <S> void startService(PlatformServiceContainer.ServiceType serviceType, java.lang.String localName, PlatformService<S> service)
- Specified by:
startServicein interfacePlatformServiceContainer
-
startService
public <S> void startService(java.lang.String name, PlatformService<S> service)- Specified by:
startServicein interfacePlatformServiceContainer
-
getObjectName
public static javax.management.ObjectName getObjectName(java.lang.String serviceName)
-
composeLocalName
public static java.lang.String composeLocalName(PlatformServiceContainer.ServiceType type, java.lang.String localName)
-
stopService
public void stopService(PlatformServiceContainer.ServiceType serviceType, java.lang.String localName)
- Specified by:
stopServicein interfacePlatformServiceContainer
-
stopService
public void stopService(java.lang.String name)
- Specified by:
stopServicein interfacePlatformServiceContainer
-
createDeploymentOperation
public DeploymentOperation.DeploymentOperationBuilder createDeploymentOperation(java.lang.String name)
- Specified by:
createDeploymentOperationin interfacePlatformServiceContainer
-
createUndeploymentOperation
public DeploymentOperation.DeploymentOperationBuilder createUndeploymentOperation(java.lang.String name)
- Specified by:
createUndeploymentOperationin interfacePlatformServiceContainer
-
executeDeploymentOperation
public void executeDeploymentOperation(DeploymentOperation operation)
- Specified by:
executeDeploymentOperationin interfacePlatformServiceContainer
-
getService
public <S> S getService(PlatformServiceContainer.ServiceType type, java.lang.String localName)
get a specific service by name or null if no such Service exists.- Specified by:
getServicein interfacePlatformServiceContainer
-
getService
public <S> S getService(javax.management.ObjectName name)
get a specific service by name or null if no such Service exists.
-
getServiceValue
public <S> S getServiceValue(javax.management.ObjectName name)
get the service value for a specific service by name or null if no such Service exists.
-
getServiceValue
public <S> S getServiceValue(PlatformServiceContainer.ServiceType type, java.lang.String localName)
get the service value for a specific service by name or null if no such Service exists.- Specified by:
getServiceValuein interfacePlatformServiceContainer
-
getServicesByType
public <S> java.util.List<PlatformService<S>> getServicesByType(PlatformServiceContainer.ServiceType type)
- Specified by:
getServicesByTypein interfacePlatformServiceContainer- Returns:
- all services for a specific
PlatformServiceContainer.ServiceType
-
getServiceNames
public java.util.Set<java.lang.String> getServiceNames(PlatformServiceContainer.ServiceType type)
- Specified by:
getServiceNamesin interfacePlatformServiceContainer- Returns:
- the service names (
ObjectName) for all services for a given type
-
getServiceValuesByType
public <S> java.util.List<S> getServiceValuesByType(PlatformServiceContainer.ServiceType type)
- Specified by:
getServiceValuesByTypein interfacePlatformServiceContainer- Returns:
- the values of all services for a specific
PlatformServiceContainer.ServiceType
-
getmBeanServer
public javax.management.MBeanServer getmBeanServer()
-
setmBeanServer
public void setmBeanServer(javax.management.MBeanServer mBeanServer)
-
createOrLookupMbeanServer
protected javax.management.MBeanServer createOrLookupMbeanServer()
-
-