public class MBeanServiceContainer extends Object
A simple Service Container that delegates to the JVM's MBeanServer
.
Modifier and Type | Class and Description |
---|---|
static interface |
MBeanServiceContainer.ServiceType
A ServiceType is a collection of services that share a common name prefix.
|
Modifier and Type | Field and Description |
---|---|
protected ThreadLocal<Stack<MBeanDeploymentOperation>> |
activeDeploymentOperations
set if the current thread is performing a composite deployment operation
|
protected MBeanServer |
mBeanServer |
protected Map<ObjectName,MBeanService<?>> |
servicesByName |
Constructor and Description |
---|
MBeanServiceContainer() |
protected MBeanServer mBeanServer
protected Map<ObjectName,MBeanService<?>> servicesByName
protected ThreadLocal<Stack<MBeanDeploymentOperation>> activeDeploymentOperations
public <S> void startService(MBeanServiceContainer.ServiceType serviceType, String localName, MBeanService<S> service)
public <S> void startService(ObjectName serviceName, MBeanService<S> service)
public void stopService(MBeanServiceContainer.ServiceType serviceType, String localName)
public void stopService(ObjectName serviceName)
public MBeanDeploymentOperation.MBeanDeploymentOperationBuilder createDeploymentOperation(String name)
public MBeanDeploymentOperation.MBeanDeploymentOperationBuilder createUndeploymentOperation(String name)
protected void executeDeploymentOperation(MBeanDeploymentOperation operation)
public <S> S getService(MBeanServiceContainer.ServiceType type, String localName)
protected <S> S getService(ObjectName name)
protected <S> S getServiceValue(ObjectName name)
public <S> S getServiceValue(MBeanServiceContainer.ServiceType type, String localName)
public <S> List<MBeanService<S>> getServicesByType(MBeanServiceContainer.ServiceType type)
MBeanServiceContainer.ServiceType
public Set<ObjectName> getServiceNames(MBeanServiceContainer.ServiceType type)
ObjectName
) for all services for a given typepublic <S> List<S> getServiceValuesByType(MBeanServiceContainer.ServiceType type)
MBeanServiceContainer.ServiceType
public MBeanServer getmBeanServer()
public void setmBeanServer(MBeanServer mBeanServer)
protected MBeanServer createOrLookupMbeanServer()
Copyright © 2015. All rights reserved.