public class MBeanServiceContainer extends Object implements PlatformServiceContainer
A simple Service Container that delegates to the JVM's MBeanServer.
PlatformServiceContainer.ServiceType| Modifier and Type | Field and Description |
|---|---|
protected ThreadLocal<Stack<DeploymentOperation>> |
activeDeploymentOperations
set if the current thread is performing a composite deployment operation
|
protected MBeanServer |
mBeanServer |
static String |
SERVICE_NAME_EXECUTOR |
protected Map<ObjectName,PlatformService<?>> |
servicesByName |
| Constructor and Description |
|---|
MBeanServiceContainer() |
protected MBeanServer mBeanServer
protected Map<ObjectName,PlatformService<?>> servicesByName
protected ThreadLocal<Stack<DeploymentOperation>> activeDeploymentOperations
public static final String SERVICE_NAME_EXECUTOR
public <S> void startService(PlatformServiceContainer.ServiceType serviceType, String localName, PlatformService<S> service)
startService in interface PlatformServiceContainerpublic <S> void startService(String name, PlatformService<S> service)
startService in interface PlatformServiceContainerpublic static ObjectName getObjectName(String serviceName)
public static String composeLocalName(PlatformServiceContainer.ServiceType type, String localName)
public void stopService(PlatformServiceContainer.ServiceType serviceType, String localName)
stopService in interface PlatformServiceContainerpublic void stopService(String name)
stopService in interface PlatformServiceContainerpublic DeploymentOperation.DeploymentOperationBuilder createDeploymentOperation(String name)
createDeploymentOperation in interface PlatformServiceContainerpublic DeploymentOperation.DeploymentOperationBuilder createUndeploymentOperation(String name)
createUndeploymentOperation in interface PlatformServiceContainerpublic void executeDeploymentOperation(DeploymentOperation operation)
executeDeploymentOperation in interface PlatformServiceContainerpublic <S> S getService(PlatformServiceContainer.ServiceType type, String localName)
getService in interface PlatformServiceContainerpublic <S> S getService(ObjectName name)
public <S> S getServiceValue(ObjectName name)
public <S> S getServiceValue(PlatformServiceContainer.ServiceType type, String localName)
getServiceValue in interface PlatformServiceContainerpublic <S> List<PlatformService<S>> getServicesByType(PlatformServiceContainer.ServiceType type)
getServicesByType in interface PlatformServiceContainerServiceTypepublic Set<String> getServiceNames(PlatformServiceContainer.ServiceType type)
getServiceNames in interface PlatformServiceContainerObjectName ) for all services for a given typepublic <S> List<S> getServiceValuesByType(PlatformServiceContainer.ServiceType type)
getServiceValuesByType in interface PlatformServiceContainerServiceTypepublic MBeanServer getmBeanServer()
public void setmBeanServer(MBeanServer mBeanServer)
protected MBeanServer createOrLookupMbeanServer()
Copyright © 2022. All rights reserved.