# Class JmxRegistry

java.lang.Object
org.apache.catalina.tribes.jmx.JmxRegistry

public class JmxRegistry extends Object
JMX registry for managing MBean registration for a channel.

## Field Summary

Fields
Modifier and Type
Field
Description
`protected static final StringManager`
`sm`
String manager for this class.

## Method Summary

Modifier and Type
Method
Description
`static JmxRegistry`
`getRegistry(Channel channel)`
Get the JMX registry for the given channel.
`ObjectName`
`registerJmx(String keyprop, Object bean)`
Register an MBean with the JMX server.
`static void`
`removeRegistry(Channel channel, boolean clear)`
Remove the JMX registry for the given channel.
`void`
`unregisterJmx(ObjectName oname)`
Unregister an MBean from the JMX server.

### Methods inherited from class Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Field Details

### sm

protected static final StringManager sm
String manager for this class.

## Method Details

### getRegistry

public static JmxRegistry getRegistry(Channel channel)
Get the JMX registry for the given channel.

Parameters:
  `channel` - the channel
Returns:
  the JMX registry, or `null` if JMX is not enabled

### removeRegistry

public static void removeRegistry(Channel channel, boolean clear)
Remove the JMX registry for the given channel.

Parameters:
  `channel` - the channel
  `clear` - whether to clear the MBeans

### registerJmx

public ObjectName registerJmx(String keyprop, Object bean)
Register an MBean with the JMX server.

Parameters:
  `keyprop` - the key property
  `bean` - the MBean to register
Returns:
  the registered object name, or `null` on failure

### unregisterJmx

public void unregisterJmx(ObjectName oname)
Unregister an MBean from the JMX server.

Parameters:
  `oname` - the object name to unregister