org.littleshoot.util
Class JmxUtils

java.lang.Object
  extended by org.littleshoot.util.JmxUtils

public class JmxUtils
extends Object

Class providing utility methods for JMX.


Method Summary
static
<T> ObjectName
getObjectName(Class<T> clazz)
          Returns an ObjectName for the specified object in standard format, using the package as the domain.
static void register(MBeanServer mbs, Object obj)
          Registers the specified object as an MBean with the specified server using standard conventions for the bean name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getObjectName

public static <T> ObjectName getObjectName(Class<T> clazz)
Returns an ObjectName for the specified object in standard format, using the package as the domain.

Type Parameters:
T - The type of class.
Parameters:
clazz - The Class to create an ObjectName for.
Returns:
The new ObjectName.

register

public static void register(MBeanServer mbs,
                            Object obj)
Registers the specified object as an MBean with the specified server using standard conventions for the bean name.

Parameters:
mbs - The MBeanServer to register with.
obj - The Object to register as an MBean.


Copyright © 2011-2013 LittleShoot. All Rights Reserved.