XMOJO 5 API Docs

javax.management
Class MBeanServerFactory

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

public class MBeanServerFactory
extends java.lang.Object

Provides references to the MBeanServer objects and acts as a factory for creating creating and releasing the references of MBeanServer objects.


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()
          Returns a new MBeanServer Object without storing the reference to the created object with standard default domain name.
static MBeanServer newMBeanServer(java.lang.String domain)
          Returns a new MBeanServer Object without storing the reference to the created object with the specified domain name.
static void releaseMBeanServer(MBeanServer mbeanServer)
          Releases all the internal references for a MBeanServer object, thus making the MBeanServer instance an eligible object for Garbage Collection.
 
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, if no domain is specified by the user.
The standard default domain name is "DefaultDomain". This can be got from MBeanServer.getDefaultDomain() method.
The MBeanServer reference is internally kept. This will allows findMBeanServer to give back a reference to this newly MBeanServer object.
Returns:
This creates a new MBean server

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 no 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.

Parameters:
domain - The MBeanServer is created with this domain name
Returns:
This creates a new MBeanServer with the specified domain name

newMBeanServer

public static MBeanServer newMBeanServer()
Returns a new MBeanServer Object without storing the reference to the created object with standard default domain name. This domain will be used as a part of the ObjectName while registering the MBeans. As no reference is kept, invoking the findMBeanServer will not give back reference to this newly created MBeanServer object, but this MBeanServer is eligible for Garbage Collection.
Parameters:
mbeanServer - The newly created MbeanServer object.

newMBeanServer

public static MBeanServer newMBeanServer(java.lang.String domain)
Returns a new MBeanServer Object without storing the reference to the created object with the specified domain name. This domain will be used as a part of the ObjectName while registering the MBeans. As no reference is kept, invoking the findMBeanServer will not give back reference to this newly created MBeanServer object, but this MBeanServer is eligible for Garbage Collection.
Parameters:
mbeanServer - The newly created MbeanServer object.

releaseMBeanServer

public static void releaseMBeanServer(MBeanServer mbeanServer)
Releases all the internal references for a MBeanServer object, thus making the MBeanServer instance an eligible object for Garbage Collection.
Parameters:
mbeanServer - The MbeanServer object to remove.

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.
Parameters:
agentId - The agent identifier of the MBeanServer to retrieve. If this parameter is null, all MBeanServer present in the JVM are returned.
Returns:
A list of MBeanServer object.

XMOJO 5 API Docs

Copyright ©2003 XMOJO.org. All Rights Reserved.