|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.apache.derby.impl.services.jmx.JMXManagementService
public final class JMXManagementService
This class implements the ManagementService interface and provides a simple management and monitoring service. An mbean registered with this service remains until it is unregistered. While registered with this service it may be registered and unregistered with the jmx service a number of times.
ManagementService| Field Summary | |
|---|---|
private static SystemPermission |
CONTROL
Control permission (permissions are immutable). |
private javax.management.MBeanServer |
mbeanServer
Platform MBean server, from ManagementFactory.getPlatformMBeanServer(). |
private javax.management.ObjectName |
myManagementBean
If this object is registered as a management mbean then myManagementBean represents its name. |
private javax.management.MBeanServer |
myManagementServer
|
private java.util.Map<javax.management.ObjectName,javax.management.StandardMBean> |
registeredMbeans
The set of mbeans registered to this service by Derby's code. |
private java.lang.String |
systemIdentifier
Runtime value to disambiguate multiple Derby systems in the same virtual machine but different class loaders. |
| Fields inherited from interface org.apache.derby.iapi.services.jmx.ManagementService |
|---|
DERBY_JMX_DOMAIN |
| Constructor Summary | |
|---|---|
JMXManagementService()
|
|
| Method Summary | |
|---|---|
void |
boot(boolean create,
java.util.Properties properties)
Start the management service if derby.system.jmx is true. |
private void |
checkJMXControl()
Require SystemPermission("jmx", "control") to change the management state. |
private void |
findServer()
Initialize the management service by obtaining the platform MBeanServer and registering system beans. |
java.lang.String |
getSystemIdentifier()
Get the system identifier that this MBean is managing. |
boolean |
isManagementActive()
Is Derby's JMX management active. |
private void |
jmxRegister(javax.management.StandardMBean standardMBean,
javax.management.ObjectName beanName)
Register an mbean with the platform mbean server. |
private void |
jmxUnregister(javax.management.ObjectName mbeanName)
Unregister an mbean from the JMX plaform server but leave it registered to this service. |
java.lang.Object |
registerMBean(java.lang.Object bean,
java.lang.Class beanInterface,
java.lang.String keyProperties)
Registers an MBean with the MBean server as a StandardMBean. |
void |
startManagement()
Inform Derby to start its JMX management by registering MBeans relevant to its current state. |
void |
stop()
Stop the module. |
void |
stopManagement()
Inform Derby to stop its JMX management by unregistering its MBeans. |
void |
unregisterMBean(java.lang.Object mbeanIdentifier)
Unregister an mbean using an object previous returned from registerMBean. |
private void |
unregisterMBean(javax.management.ObjectName mbeanName)
Unregisters an mbean from this service and JMX plaform server |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private javax.management.MBeanServer mbeanServer
private java.util.Map<javax.management.ObjectName,javax.management.StandardMBean> registeredMbeans
private javax.management.ObjectName myManagementBean
private javax.management.MBeanServer myManagementServer
private java.lang.String systemIdentifier
private static final SystemPermission CONTROL
| Constructor Detail |
|---|
public JMXManagementService()
| Method Detail |
|---|
public void boot(boolean create,
java.util.Properties properties)
throws StandardException
Starting the service means:
boot in interface ModuleControlStandardException - Module cannot be started.Monitor,
ModuleFactorypublic void stop()
ModuleControl
stop in interface ModuleControlMonitor,
ModuleFactoryprivate void findServer()
public java.lang.Object registerMBean(java.lang.Object bean,
java.lang.Class beanInterface,
java.lang.String keyProperties)
throws StandardException
registerMBean in interface ManagementServicebean - The MBean to wrap with a StandardMBean and registerbeanInterface - The management interface for the MBean.keyProperties - The String representation of the MBean's key properties,
they will be added into the ObjectName with Derby's domain. Key
type should be first with a short name for the bean, typically the
class name without the package.
StandardException
private void jmxRegister(javax.management.StandardMBean standardMBean,
javax.management.ObjectName beanName)
throws javax.management.JMException
javax.management.JMExceptionpublic void unregisterMBean(java.lang.Object mbeanIdentifier)
unregisterMBean in interface ManagementServicembeanIdentifier - An identifier returned by registerMBean.private void unregisterMBean(javax.management.ObjectName mbeanName)
mbeanName - Bean to unregister.private void jmxUnregister(javax.management.ObjectName mbeanName)
mbeanName - public boolean isManagementActive()
ManagementMBean
isManagementActive in interface ManagementMBeanpublic void startManagement()
ManagementMBean
Require SystemPermission("jmx", "control") if a security
manager is installed.
startManagement in interface ManagementMBeanSystemPermissionpublic void stopManagement()
ManagementMBean
Require SystemPermission("jmx", "control") if a security
manager is installed.
stopManagement in interface ManagementMBeanSystemPermissionprivate void checkJMXControl()
public java.lang.String getSystemIdentifier()
ManagementMBean
getSystemIdentifier in interface ManagementMBean
|
Built on Wed 2013-06-12 15:21:56+0000, from revision ??? | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||