org.camunda.bpm.container.impl.jmx.kernel
Class MBeanServiceContainer

java.lang.Object
  extended by org.camunda.bpm.container.impl.jmx.kernel.MBeanServiceContainer

public class MBeanServiceContainer
extends Object

A simple Service Container that delegates to the JVM's MBeanServer.

Author:
Daniel Meyer

Nested Class Summary
static interface MBeanServiceContainer.ServiceType
          A ServiceType is a collection of services that share a common name prefix.
 
Field Summary
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 Summary
MBeanServiceContainer()
           
 
Method Summary
 MBeanDeploymentOperation.MBeanDeploymentOperationBuilder createDeploymentOperation(String name)
           
protected  MBeanServer createOrLookupMbeanServer()
           
 MBeanDeploymentOperation.MBeanDeploymentOperationBuilder createUndeploymentOperation(String name)
           
protected  void executeDeploymentOperation(MBeanDeploymentOperation operation)
           
 MBeanServer getmBeanServer()
           
<S> S
getService(MBeanServiceContainer.ServiceType type, String localName)
          get a specific service by name or null if no such Service exists.
protected
<S> S
getService(ObjectName name)
          get a specific service by name or null if no such Service exists.
 Set<ObjectName> getServiceNames(MBeanServiceContainer.ServiceType type)
           
<S> List<MBeanService<S>>
getServicesByType(MBeanServiceContainer.ServiceType type)
           
<S> S
getServiceValue(MBeanServiceContainer.ServiceType type, String localName)
          get the service value for a specific service by name or null if no such Service exists.
protected
<S> S
getServiceValue(ObjectName name)
          get the service value for a specific service by name or null if no such Service exists.
<S> List<S>
getServiceValuesByType(MBeanServiceContainer.ServiceType type)
           
 void setmBeanServer(MBeanServer mBeanServer)
           
<S> void
startService(MBeanServiceContainer.ServiceType serviceType, String localName, MBeanService<S> service)
           
<S> void
startService(ObjectName serviceName, MBeanService<S> service)
           
 void stopService(MBeanServiceContainer.ServiceType serviceType, String localName)
           
 void stopService(ObjectName serviceName)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mBeanServer

protected MBeanServer mBeanServer

servicesByName

protected Map<ObjectName,MBeanService<?>> servicesByName

activeDeploymentOperations

protected ThreadLocal<Stack<MBeanDeploymentOperation>> activeDeploymentOperations
set if the current thread is performing a composite deployment operation

Constructor Detail

MBeanServiceContainer

public MBeanServiceContainer()
Method Detail

startService

public <S> void startService(MBeanServiceContainer.ServiceType serviceType,
                             String localName,
                             MBeanService<S> service)

startService

public <S> void startService(ObjectName serviceName,
                             MBeanService<S> service)

stopService

public void stopService(MBeanServiceContainer.ServiceType serviceType,
                        String localName)

stopService

public void stopService(ObjectName serviceName)

createDeploymentOperation

public MBeanDeploymentOperation.MBeanDeploymentOperationBuilder createDeploymentOperation(String name)

createUndeploymentOperation

public MBeanDeploymentOperation.MBeanDeploymentOperationBuilder createUndeploymentOperation(String name)

executeDeploymentOperation

protected void executeDeploymentOperation(MBeanDeploymentOperation operation)

getService

public <S> S getService(MBeanServiceContainer.ServiceType type,
                        String localName)
get a specific service by name or null if no such Service exists.


getService

protected <S> S getService(ObjectName name)
get a specific service by name or null if no such Service exists.


getServiceValue

protected <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(MBeanServiceContainer.ServiceType type,
                             String localName)
get the service value for a specific service by name or null if no such Service exists.


getServicesByType

public <S> List<MBeanService<S>> getServicesByType(MBeanServiceContainer.ServiceType type)
Returns:
all services for a specific MBeanServiceContainer.ServiceType

getServiceNames

public Set<ObjectName> getServiceNames(MBeanServiceContainer.ServiceType type)
Returns:
the service names ( ObjectName ) for all services for a given type

getServiceValuesByType

public <S> List<S> getServiceValuesByType(MBeanServiceContainer.ServiceType type)
Returns:
the values of all services for a specific MBeanServiceContainer.ServiceType

getmBeanServer

public MBeanServer getmBeanServer()

setmBeanServer

public void setmBeanServer(MBeanServer mBeanServer)

createOrLookupMbeanServer

protected MBeanServer createOrLookupMbeanServer()


Copyright © 2014 camunda services GmbH. All Rights Reserved.