Class MBeanServiceContainer
- java.lang.Object
-
- org.camunda.bpm.container.impl.jmx.MBeanServiceContainer
-
- All Implemented Interfaces:
PlatformServiceContainer
public class MBeanServiceContainer extends 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 ThreadLocal<Stack<DeploymentOperation>>activeDeploymentOperationsset if the current thread is performing a composite deployment operationprotected MBeanServermBeanServerstatic StringSERVICE_NAME_EXECUTORprotected Map<ObjectName,PlatformService<?>>servicesByName
-
Constructor Summary
Constructors Constructor Description MBeanServiceContainer()
-
Method Summary
-
-
-
Field Detail
-
mBeanServer
protected MBeanServer mBeanServer
-
servicesByName
protected Map<ObjectName,PlatformService<?>> servicesByName
-
activeDeploymentOperations
protected ThreadLocal<Stack<DeploymentOperation>> activeDeploymentOperations
set if the current thread is performing a composite deployment operation
-
SERVICE_NAME_EXECUTOR
public static final String SERVICE_NAME_EXECUTOR
- See Also:
- Constant Field Values
-
-
Method Detail
-
startService
public <S> void startService(PlatformServiceContainer.ServiceType serviceType, String localName, PlatformService<S> service)
- Specified by:
startServicein interfacePlatformServiceContainer
-
startService
public <S> void startService(String name, PlatformService<S> service)
- Specified by:
startServicein interfacePlatformServiceContainer
-
getObjectName
public static ObjectName getObjectName(String serviceName)
-
composeLocalName
public static String composeLocalName(PlatformServiceContainer.ServiceType type, String localName)
-
stopService
public void stopService(PlatformServiceContainer.ServiceType serviceType, String localName)
- Specified by:
stopServicein interfacePlatformServiceContainer
-
stopService
public void stopService(String name)
- Specified by:
stopServicein interfacePlatformServiceContainer
-
createDeploymentOperation
public DeploymentOperation.DeploymentOperationBuilder createDeploymentOperation(String name)
- Specified by:
createDeploymentOperationin interfacePlatformServiceContainer
-
createUndeploymentOperation
public DeploymentOperation.DeploymentOperationBuilder createUndeploymentOperation(String name)
- Specified by:
createUndeploymentOperationin interfacePlatformServiceContainer
-
executeDeploymentOperation
public void executeDeploymentOperation(DeploymentOperation operation)
- Specified by:
executeDeploymentOperationin interfacePlatformServiceContainer
-
getService
public <S> S getService(PlatformServiceContainer.ServiceType type, String localName)
get a specific service by name or null if no such Service exists.- Specified by:
getServicein interfacePlatformServiceContainer
-
getService
public <S> S getService(ObjectName name)
get a specific service by name or null if no such Service exists.
-
getServiceValue
public <S> S getServiceValue(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, 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> List<PlatformService<S>> getServicesByType(PlatformServiceContainer.ServiceType type)
- Specified by:
getServicesByTypein interfacePlatformServiceContainer- Returns:
- all services for a specific
PlatformServiceContainer.ServiceType
-
getServiceNames
public Set<String> getServiceNames(PlatformServiceContainer.ServiceType type)
- Specified by:
getServiceNamesin interfacePlatformServiceContainer- Returns:
- the service names (
ObjectName) for all services for a given type
-
getServiceValuesByType
public <S> List<S> getServiceValuesByType(PlatformServiceContainer.ServiceType type)
- Specified by:
getServiceValuesByTypein interfacePlatformServiceContainer- Returns:
- the values of all services for a specific
PlatformServiceContainer.ServiceType
-
getmBeanServer
public MBeanServer getmBeanServer()
-
setmBeanServer
public void setmBeanServer(MBeanServer mBeanServer)
-
createOrLookupMbeanServer
protected MBeanServer createOrLookupMbeanServer()
-
-