org.glassfish.gmbal
Class ManagedObjectManagerFactory

java.lang.Object
  extended by org.glassfish.gmbal.ManagedObjectManagerFactory

public final class ManagedObjectManagerFactory
extends java.lang.Object

Factory used to create ManagedObjectManager instances.


Method Summary
static ManagedObjectManager createFederated(javax.management.ObjectName rootParentName)
          Alternative form of the create method to be used when the rootName is not needed explicitly.
static ManagedObjectManager createNOOP()
          Return a ManagedObjectManager that performs no operations.
static ManagedObjectManager createStandalone(java.lang.String domain)
          Create a new ManagedObjectManager.
static java.lang.reflect.Method getMethod(java.lang.Class<?> cls, java.lang.String name, java.lang.Class<?>... types)
          Convenience method for getting access to a method through reflection.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getMethod

public static java.lang.reflect.Method getMethod(java.lang.Class<?> cls,
                                                 java.lang.String name,
                                                 java.lang.Class<?>... types)
Convenience method for getting access to a method through reflection. Same as Class.getDeclaredMethod, but only throws RuntimeExceptions.

Parameters:
cls - The class to search for a method.
name - The method name.
types - The array of argument types.
Returns:
The Method if found.
Throws:
GmbalException - if no such method is found.

createStandalone

public static ManagedObjectManager createStandalone(java.lang.String domain)
Create a new ManagedObjectManager. All objectnames created will share the domain value passed on this call. This ManagedObjectManager is at the top of the containment hierarchy: the parent of the root is null.

Parameters:
domain - The domain to use for all ObjectNames created when MBeans are registered.
Returns:
A new ManagedObjectManager.

createFederated

public static ManagedObjectManager createFederated(javax.management.ObjectName rootParentName)
Alternative form of the create method to be used when the rootName is not needed explicitly. If the root name is available from an @ObjectNameKey annotation, it is used; otherwise the type is used as the name, since the root is a singleton.

Parameters:
rootParentName - The JMX ObjectName of the parent of the root. The parent is outside of the control of this ManagedObjectManager. The ManagedObjectManager root is a child of the MBean identified by the rootParentName.
Returns:
The ManagedObjectManager.

createNOOP

public static ManagedObjectManager createNOOP()
Return a ManagedObjectManager that performs no operations. Useful to allow the same code to run with or without creating MBeans through gmbal.

Returns:
ManagedObjectManager that performs no operations.