Class ManagementManager


  • public class ManagementManager
    extends java.lang.Object
    Management interface for DataNucleus. Management operations and attributes are exposed through this interface that holds statistics linked to a NucleusContext instance.

    The mechanics for starting and stopping JMX servers are not defined here, and must be done by plug-ins, by providing the implementation of ManagementServer. This Manager controls the lifecycle of management servers. A management server is started when an instance of this class is created, and its shutdown when the close operation is invoked The management server startup is triggered when the Manager gets enabled.

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private boolean closed
      Whether this is closed.
      private java.lang.String domainName
      Domain name for this configuration.
      private java.lang.String instanceName
      Instance name for this configuration.
      private ManagementServer mgmtServer
      The Management Server.
      private NucleusContext nucleusContext
      NucleusContext that we are managing.
      static java.util.Random random
      Random number generator, for use when needing unique names.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      private void assertNotClosed()
      Assert that this instance is open
      void close()
      Close a instance.
      void deregisterMBean​(java.lang.String name)
      Deregister an MBean from the MBeanServer
      java.lang.String getDomainName()
      Domain name for this manager instance.
      java.lang.String getInstanceName()
      Instance name for this manager instance.
      boolean isOpen()
      Whether this Manager is not closed
      void registerMBean​(java.lang.Object mbean, java.lang.String name)
      Register an MBean into the MBeanServer
      private void startManagementServer()
      Start Management Server
      private void stopManagementServer()
      Shutdown Management Server
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • random

        public static final java.util.Random random
        Random number generator, for use when needing unique names.
      • nucleusContext

        private final NucleusContext nucleusContext
        NucleusContext that we are managing.
      • closed

        private boolean closed
        Whether this is closed.
      • domainName

        private java.lang.String domainName
        Domain name for this configuration.
      • instanceName

        private java.lang.String instanceName
        Instance name for this configuration.
    • Constructor Detail

      • ManagementManager

        public ManagementManager​(NucleusContext ctxt)
        Constructor for Management.
        Parameters:
        ctxt - the NucleusContext that we are operating for
    • Method Detail

      • getInstanceName

        public java.lang.String getInstanceName()
        Instance name for this manager instance.
        Returns:
        Instance name
      • getDomainName

        public java.lang.String getDomainName()
        Domain name for this manager instance.
        Returns:
        Domain name
      • registerMBean

        public void registerMBean​(java.lang.Object mbean,
                                  java.lang.String name)
        Register an MBean into the MBeanServer
        Parameters:
        mbean - the MBean instance
        name - the mbean name
      • deregisterMBean

        public void deregisterMBean​(java.lang.String name)
        Deregister an MBean from the MBeanServer
        Parameters:
        name - the mbean name
      • isOpen

        public boolean isOpen()
        Whether this Manager is not closed
        Returns:
        true if this Manager is open
      • close

        public void close()
        Close a instance.
        Throws:
        NucleusException - if the manager is closed
      • assertNotClosed

        private void assertNotClosed()
        Assert that this instance is open
      • startManagementServer

        private void startManagementServer()
        Start Management Server
      • stopManagementServer

        private void stopManagementServer()
        Shutdown Management Server