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>>
activeDeploymentOperations
set if the current thread is performing a composite deployment operationprotected MBeanServer
mBeanServer
static String
SERVICE_NAME_EXECUTOR
protected 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:
startService
in interfacePlatformServiceContainer
-
startService
public <S> void startService(String name, PlatformService<S> service)
- Specified by:
startService
in 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:
stopService
in interfacePlatformServiceContainer
-
stopService
public void stopService(String name)
- Specified by:
stopService
in interfacePlatformServiceContainer
-
createDeploymentOperation
public DeploymentOperation.DeploymentOperationBuilder createDeploymentOperation(String name)
- Specified by:
createDeploymentOperation
in interfacePlatformServiceContainer
-
createUndeploymentOperation
public DeploymentOperation.DeploymentOperationBuilder createUndeploymentOperation(String name)
- Specified by:
createUndeploymentOperation
in interfacePlatformServiceContainer
-
executeDeploymentOperation
public void executeDeploymentOperation(DeploymentOperation operation)
- Specified by:
executeDeploymentOperation
in 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:
getService
in 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:
getServiceValue
in interfacePlatformServiceContainer
-
getServicesByType
public <S> List<PlatformService<S>> getServicesByType(PlatformServiceContainer.ServiceType type)
- Specified by:
getServicesByType
in interfacePlatformServiceContainer
- Returns:
- all services for a specific
PlatformServiceContainer.ServiceType
-
getServiceNames
public Set<String> getServiceNames(PlatformServiceContainer.ServiceType type)
- Specified by:
getServiceNames
in interfacePlatformServiceContainer
- Returns:
- the service names (
ObjectName
) for all services for a given type
-
getServiceValuesByType
public <S> List<S> getServiceValuesByType(PlatformServiceContainer.ServiceType type)
- Specified by:
getServiceValuesByType
in 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()
-
-