Module org.apache.derby.engine
Package org.apache.derby.mbeans

# Interface ManagementMBean

All Known Implementing Classes:
  `Management`

public interface ManagementMBean
JMX MBean inteface to control visibility of Derby's MBeans. When Derby boots it attempts to register its MBeans. It may fail due to lack of valid permissions. If Derby does not register its MBeans then an application may register the Management implementation of ManagementMBean itself and use it to start Derby's JMX management.

Key properties for registered MBean when registered by Derby:

- `type=Management`
- `system=`runtime system identifier (see overview)

See Also:
  - `Management`
  - `getSystemIdentifier()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `String`
  `getSystemIdentifier()`
  Get the system identifier that this MBean is managing.
  `boolean`
  `isManagementActive()`
  Is Derby's JMX management active.
  `void`
  `startManagement()`
  Inform Derby to start its JMX management by registering MBeans relevant to its current state.
  `void`
  `stopManagement()`
  Inform Derby to stop its JMX management by unregistering its MBeans.

- ## Method Details

  - ### isManagementActive

    boolean isManagementActive()
    Is Derby's JMX management active. If active then Derby has registered MBeans relevant to its current state.
    Returns:
      true Derby has registered beans, false Derby has not registered any beans.

  - ### getSystemIdentifier

    String getSystemIdentifier()
    Get the system identifier that this MBean is managing. The system identifier is a runtime value to disambiguate multiple Derby systems in the same virtual machine but different class loaders.
    Returns:
      Runtime identifier for the system, null if Derby is not running.

  - ### startManagement

    void startManagement()
    Inform Derby to start its JMX management by registering MBeans relevant to its current state. If Derby is not booted then no action is taken.

    Require `SystemPermission("jmx", "control")` if a security manager is installed.

    See Also:
      - `SystemPermission`

  - ### stopManagement

    void stopManagement()
    Inform Derby to stop its JMX management by unregistering its MBeans. If Derby is not booted then no action is taken.

    Require `SystemPermission("jmx", "control")` if a security manager is installed.

    See Also:
      - `SystemPermission`