org.jboss.portal.jems.as
Class JMX

java.lang.Object
  extended by org.jboss.portal.jems.as.JMX

public final class JMX
extends java.lang.Object

Version:
$Revision: 6728 $
Author:
Julien Viet

Field Summary
static java.util.Comparator OBJECT_NAME_COMPARATOR
          ObjectName comparator based on canonical name lexicography.
 
Constructor Summary
JMX()
           
 
Method Summary
static boolean addNotificationListener(javax.management.MBeanServer server, javax.management.ObjectName name, javax.management.NotificationListener listener, javax.management.NotificationFilter filter, java.lang.Object handback)
           
static javax.management.ObjectName extend(javax.management.ObjectName name, java.util.Properties keyProperties)
           
static java.lang.Object getMBeanProxy(java.lang.Class clazz, javax.management.ObjectName name, javax.management.MBeanServer server)
          Retrieves the MBeanProxy associated with the given class and name from the specified MBeanServer.
static java.lang.Object getMBeanProxy(java.lang.Class clazz, java.lang.String name)
          Retrieves the MBeanProxy associated with the given class and name from the JBoss microkernel as returned by MBeanServerLocator.locateJBoss().
static boolean removeNotificationListener(javax.management.MBeanServer server, javax.management.ObjectName name, javax.management.NotificationListener listener)
           
static void safeUnregister(javax.management.MBeanServer server, javax.management.ObjectName name)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

OBJECT_NAME_COMPARATOR

public static java.util.Comparator OBJECT_NAME_COMPARATOR
ObjectName comparator based on canonical name lexicography.

Constructor Detail

JMX

public JMX()
Method Detail

extend

public static javax.management.ObjectName extend(javax.management.ObjectName name,
                                                 java.util.Properties keyProperties)

safeUnregister

public static void safeUnregister(javax.management.MBeanServer server,
                                  javax.management.ObjectName name)

getMBeanProxy

public static java.lang.Object getMBeanProxy(java.lang.Class clazz,
                                             javax.management.ObjectName name,
                                             javax.management.MBeanServer server)
Retrieves the MBeanProxy associated with the given class and name from the specified MBeanServer.

Parameters:
clazz - the interface implemented by the MBean which is to be retrieved
name - the MBean's ObjectName
server - the MBeanServer from which to retrieve the MBeanProxy
Returns:
a MBeanProxy for the specified MBean if it exists
Throws:
java.lang.RuntimeException - if the MBean couldn't be retrieved

getMBeanProxy

public static java.lang.Object getMBeanProxy(java.lang.Class clazz,
                                             java.lang.String name)
Retrieves the MBeanProxy associated with the given class and name from the JBoss microkernel as returned by MBeanServerLocator.locateJBoss().

Parameters:
clazz - the interface implemented by the MBean which is to be retrieved
name - a String representation of the MBean's ObjectName
Returns:
a MBeanProxy for the specified MBean if it exists
Throws:
java.lang.IllegalArgumentException - if the given name is not a valid ObjectName
java.lang.RuntimeException - if the MBean couldn't be retrieved
Since:
2.4
See Also:
getMBeanProxy(Class, javax.management.ObjectName, javax.management.MBeanServer)

addNotificationListener

public static boolean addNotificationListener(javax.management.MBeanServer server,
                                              javax.management.ObjectName name,
                                              javax.management.NotificationListener listener,
                                              javax.management.NotificationFilter filter,
                                              java.lang.Object handback)

removeNotificationListener

public static boolean removeNotificationListener(javax.management.MBeanServer server,
                                                 javax.management.ObjectName name,
                                                 javax.management.NotificationListener listener)