Interface ManagementService
-
- All Superinterfaces:
ManagementMBean
- All Known Implementing Classes:
JMXManagementService
,NoManagementService
public interface ManagementService extends ManagementMBean
This interface represents a Management Service. An implementation of this service is started by the Derby monitor if the system property derby.system.jmx has been set. The following services are provided:- Create and start an instance of MBean server to register MBeans.
- Create managed beans (MBeans) to instrument derby resources for management and monitoring. The following code can be used to locate an instance of this service if running. ManagementService ms = (ManagementService) Monitor.getSystemModule(Module.JMX);
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
DERBY_JMX_DOMAIN
The domain for all of derby's mbeans: org.apache.derby
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.String
quotePropertyValue(java.lang.String value)
Quote an MBean key property value, so that it is safe to pass toregisterMBean(T, java.lang.Class<T>, java.lang.String)
even if it potentially contains special characters.<T> java.lang.Object
registerMBean(T bean, java.lang.Class<T> beanInterface, java.lang.String keyProperties)
Registers an MBean with the MBean server.void
unregisterMBean(java.lang.Object mbeanIdentifier)
Unregister a mbean previously registered with registerMBean.-
Methods inherited from interface org.apache.derby.mbeans.ManagementMBean
getSystemIdentifier, isManagementActive, startManagement, stopManagement
-
-
-
-
Field Detail
-
DERBY_JMX_DOMAIN
static final java.lang.String DERBY_JMX_DOMAIN
The domain for all of derby's mbeans: org.apache.derby- See Also:
- Constant Field Values
-
-
Method Detail
-
registerMBean
<T> java.lang.Object registerMBean(T bean, java.lang.Class<T> beanInterface, java.lang.String keyProperties) throws StandardException
Registers an MBean with the MBean server. The mbean will be unregistered automatically when Derby shuts down.- Parameters:
bean
- 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.- Returns:
- An identifier that can later be used to unregister the mbean.
- Throws:
StandardException
-
unregisterMBean
void unregisterMBean(java.lang.Object mbeanIdentifier)
Unregister a mbean previously registered with registerMBean.- Parameters:
mbeanIdentifier
- An identifier returned by registerMBean.
-
quotePropertyValue
java.lang.String quotePropertyValue(java.lang.String value)
Quote an MBean key property value, so that it is safe to pass toregisterMBean(T, java.lang.Class<T>, java.lang.String)
even if it potentially contains special characters.- Parameters:
value
- the value to quote- Returns:
- the quoted value
- See Also:
ObjectName.quote(String)
-
-