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 PlatformServiceContainer
public <S> void startService(String name, PlatformService<S> service)
startService
in interface PlatformServiceContainer
public 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 PlatformServiceContainer
public void stopService(String name)
stopService
in interface PlatformServiceContainer
public DeploymentOperation.DeploymentOperationBuilder createDeploymentOperation(String name)
createDeploymentOperation
in interface PlatformServiceContainer
public DeploymentOperation.DeploymentOperationBuilder createUndeploymentOperation(String name)
createUndeploymentOperation
in interface PlatformServiceContainer
public void executeDeploymentOperation(DeploymentOperation operation)
executeDeploymentOperation
in interface PlatformServiceContainer
public <S> S getService(PlatformServiceContainer.ServiceType type, String localName)
getService
in interface PlatformServiceContainer
public <S> S getService(ObjectName name)
public <S> S getServiceValue(ObjectName name)
public <S> S getServiceValue(PlatformServiceContainer.ServiceType type, String localName)
getServiceValue
in interface PlatformServiceContainer
public <S> List<PlatformService<S>> getServicesByType(PlatformServiceContainer.ServiceType type)
getServicesByType
in interface PlatformServiceContainer
ServiceType
public Set<String> getServiceNames(PlatformServiceContainer.ServiceType type)
getServiceNames
in interface PlatformServiceContainer
ObjectName
) for all services for a given typepublic <S> List<S> getServiceValuesByType(PlatformServiceContainer.ServiceType type)
getServiceValuesByType
in interface PlatformServiceContainer
ServiceType
public MBeanServer getmBeanServer()
public void setmBeanServer(MBeanServer mBeanServer)
protected MBeanServer createOrLookupMbeanServer()
Copyright © 2017. All rights reserved.