javax.management
Class MBeanServerFactory

java.lang.Object
  |
  +--javax.management.MBeanServerFactory

public class MBeanServerFactory

extends java.lang.Object

Provides MBean server references.

Version:

1.14

Author:

Cosimo Vampo, Raimondo Castino

 

Method Summary

static MBeanServer createMBeanServer()
    Return a new object implementing the MBeanServer interface with a standard default domain name.
static MBeanServer createMBeanServer(java.lang.String domain)
    Return a new object implementing the MBeanServer interface with the specified default domain name.
static java.util.ArrayList findMBeanServer(java.lang.String AgentId)
    Return a list of objects implementing the MBeanServer interface.
static MBeanServer newMBeanServer()
    Return a new object implementing the MBeanServer interface with a standard default domain name, without keeping an internal reference to this new object.
static MBeanServer newMBeanServer(java.lang.String domain)
    Return a new object implementing the MBeanServer interface with the specified default domain name, without keeping an internal reference to this new object.
static void releaseMBeanServer(MBeanServer mbeanServer)
    Remove internal references to a created MBeanServer.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

 

Method Detail

createMBeanServer

public static MBeanServer createMBeanServer()

Return a new object implementing the MBeanServer interface with a standard default domain name. The default domain name is used as the domain part in the ObjectName of MBeans.

The standard default domain name is defined in ServiceName.DOMAIN

The MBeanServer reference is internally kept. This will allows findMBeanServer to give back a reference to this newly MBeanServer object.


createMBeanServer

public static MBeanServer createMBeanServer(java.lang.String domain)

Return a new object implementing the MBeanServer interface with the specified default domain name. The default domain name is used as the domain part in the ObjectName of MBeans if domain is specified by the user is null. The MBeanServer reference is internally kept. This will allows findMBeanServer to give back a reference to this newly MBeanServer object.

findMBeanServer

public static java.util.ArrayList findMBeanServer(java.lang.String AgentId)

Return a list of objects implementing the MBeanServer interface. This static method allows a user to retrieve references on MBeanServer which have been instantiated in the Java Virtual Machine.

 

Returns:

A list of MBeanServer objects.

newMBeanServer

public static MBeanServer newMBeanServer()

Return a new object implementing the MBeanServer interface with a standard default domain name, without keeping an internal reference to this new object. The default domain name is used as the domain part in the ObjectName of MBeans. The standard default domain name is defined in ServiceName.DOMAIN No reference is kept. findMBeanServer will not be able to give back reference to this newly MBeanServer object, but the java garbage-collector will be able to remove Mbeanserver object, when necessary.

newMBeanServer

public static MBeanServer newMBeanServer(java.lang.String domain)

Return a new object implementing the MBeanServer interface with the specified default domain name, without keeping an internal reference to this new object. The default domain name is used as the domain part in the ObjectName of MBeans if domain is specified by the user is null. No reference is kept. findMBeanServer will not be able to give back reference to this newly MBeanServer object, but the java garbage-collector will be able to remove Mbean server object, when necessary.

releaseMBeanServer

public static void releaseMBeanServer(MBeanServer mbeanServer)
                               throws java.lang.IllegalArgumentException

Remove internal references to a created MBeanServer. This allows the java garbage-collector to remove Mbean server object, when necessary.

 

Parameters:

mbeanServer - - The MbeanServer object to remove.

 

Throws:

java.lang.IllegalArgumentException - - The mbeanServer is not found.