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

java.lang.Object
  extended by 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
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 Summary
MBeanServiceContainer()
           
 
Method Summary
static String composeLocalName(PlatformServiceContainer.ServiceType type, String localName)
           
 DeploymentOperation.DeploymentOperationBuilder createDeploymentOperation(String name)
           
protected  MBeanServer createOrLookupMbeanServer()
           
 DeploymentOperation.DeploymentOperationBuilder createUndeploymentOperation(String name)
           
 void executeDeploymentOperation(DeploymentOperation operation)
           
 MBeanServer getmBeanServer()
           
static ObjectName getObjectName(String serviceName)
           
<S> S
getService(ObjectName name)
          get a specific service by name or null if no such Service exists.
<S> S
getService(PlatformServiceContainer.ServiceType type, String localName)
          get a specific service by name or null if no such Service exists.
 Set<String> getServiceNames(PlatformServiceContainer.ServiceType type)
           
<S> List<PlatformService<S>>
getServicesByType(PlatformServiceContainer.ServiceType type)
           
<S> S
getServiceValue(ObjectName name)
          get the service value for a specific service by name or null if no such Service exists.
<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.
<S> List<S>
getServiceValuesByType(PlatformServiceContainer.ServiceType type)
           
 void setmBeanServer(MBeanServer mBeanServer)
           
<S> void
startService(PlatformServiceContainer.ServiceType serviceType, String localName, PlatformService<S> service)
           
<S> void
startService(String name, PlatformService<S> service)
           
 void stopService(PlatformServiceContainer.ServiceType serviceType, String localName)
           
 void stopService(String name)
           
 
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,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
Constructor Detail

MBeanServiceContainer

public MBeanServiceContainer()
Method Detail

startService

public <S> void startService(PlatformServiceContainer.ServiceType serviceType,
                             String localName,
                             PlatformService<S> service)
Specified by:
startService in interface PlatformServiceContainer

startService

public <S> void startService(String name,
                             PlatformService<S> service)
Specified by:
startService in interface PlatformServiceContainer

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 interface PlatformServiceContainer

stopService

public void stopService(String name)
Specified by:
stopService in interface PlatformServiceContainer

createDeploymentOperation

public DeploymentOperation.DeploymentOperationBuilder createDeploymentOperation(String name)
Specified by:
createDeploymentOperation in interface PlatformServiceContainer

createUndeploymentOperation

public DeploymentOperation.DeploymentOperationBuilder createUndeploymentOperation(String name)
Specified by:
createUndeploymentOperation in interface PlatformServiceContainer

executeDeploymentOperation

public void executeDeploymentOperation(DeploymentOperation operation)
Specified by:
executeDeploymentOperation in interface PlatformServiceContainer

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 interface PlatformServiceContainer

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 interface PlatformServiceContainer

getServicesByType

public <S> List<PlatformService<S>> getServicesByType(PlatformServiceContainer.ServiceType type)
Specified by:
getServicesByType in interface PlatformServiceContainer
Returns:
all services for a specific ServiceType

getServiceNames

public Set<String> getServiceNames(PlatformServiceContainer.ServiceType type)
Specified by:
getServiceNames in interface PlatformServiceContainer
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 interface PlatformServiceContainer
Returns:
the values of all services for a specific ServiceType

getmBeanServer

public MBeanServer getmBeanServer()

setmBeanServer

public void setmBeanServer(MBeanServer mBeanServer)

createOrLookupMbeanServer

protected MBeanServer createOrLookupMbeanServer()


Copyright © 2017 camunda services GmbH. All rights reserved.