org.ow2.jasmine.vmm.agent.jmx
Class JMXUtil

java.lang.Object
  extended by org.ow2.jasmine.vmm.agent.jmx.JMXUtil

public class JMXUtil
extends java.lang.Object

Various JMX-related utility methods


Constructor Summary
JMXUtil()
           
 
Method Summary
static
<E> E
castProxy(java.lang.Object proxy, java.lang.Class<E> c)
          Cast a MBean proxy to a given type
static javax.management.NotificationEmitter proxyToEmitter(java.lang.Object proxy)
          Transforms a MBean proxy to a notification emitter
static javax.management.ObjectName proxyToObjectName(java.lang.Object proxy)
          Returns the object name of a the MBean represented by the given proxy
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JMXUtil

public JMXUtil()
Method Detail

proxyToObjectName

public static javax.management.ObjectName proxyToObjectName(java.lang.Object proxy)
Returns the object name of a the MBean represented by the given proxy

Parameters:
proxy - MBean proxy
Returns:
the object name of the MBean

proxyToEmitter

public static javax.management.NotificationEmitter proxyToEmitter(java.lang.Object proxy)
Transforms a MBean proxy to a notification emitter

Parameters:
proxy - MBean proxy
Returns:
the notification emitter

castProxy

public static <E> E castProxy(java.lang.Object proxy,
                              java.lang.Class<E> c)
Cast a MBean proxy to a given type

Type Parameters:
E - type of the proxy to return
Parameters:
proxy - MBean proxy
c -
Returns:
proxy of the target type


Copyright © 2009 OW2 Consortium. All Rights Reserved.