org.jgroups.jmx
Class JmxConfigurator

java.lang.Object
  extended by org.jgroups.jmx.JmxConfigurator

public class JmxConfigurator
extends java.lang.Object

Version:
$Id: JmxConfigurator.java,v 1.10 2006/08/09 13:02:21 belaban Exp $
Author:
Bela Ban

Constructor Summary
JmxConfigurator()
           
 
Method Summary
protected static Protocol findProtocol(Protocol prot)
           
static JChannel registerChannel(JChannel channel, javax.management.MBeanServer server, java.lang.String name)
          Registers an already created channel with the MBeanServer.
static JChannel registerChannel(JChannel channel, javax.management.MBeanServer server, java.lang.String domain, java.lang.String cluster_name, boolean register_protocols)
          Registers an already created channel with the MBeanServer.
static JChannelFactory registerChannelFactory(JChannelFactory factory, javax.management.MBeanServer server, java.lang.String name)
           
static void registerProtocols(javax.management.MBeanServer server, JChannel channel, java.lang.String prefix)
          Takes all protocols of an existing stack, creates corresponding MBean proxies and registers them with the MBean server
static void unregister(javax.management.MBeanServer server, java.lang.String object_name)
          Unregisters object_name and everything under it
static void unregisterChannel(javax.management.MBeanServer server, javax.management.ObjectName name)
           
static void unregisterChannel(javax.management.MBeanServer server, java.lang.String name)
           
static void unregisterProtocols(javax.management.MBeanServer server, JChannel channel, java.lang.String channel_name)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JmxConfigurator

public JmxConfigurator()
Method Detail

registerChannel

public static JChannel registerChannel(JChannel channel,
                                       javax.management.MBeanServer server,
                                       java.lang.String domain,
                                       java.lang.String cluster_name,
                                       boolean register_protocols)
                                throws java.lang.Exception
Registers an already created channel with the MBeanServer. Creates an org.jgroups.jmx.JChannel which delegates to the org.jgroups.JChannel and registers it. Optionally, this method will also try to create one MBean proxy for each protocol in the channel's protocol stack, and register it as well.

Parameters:
channel -
server -
domain - Has to be a JMX ObjectName of the domain, e.g. DefaultDomain:name=JGroups
register_protocols -
Returns:
org.jgroups.jmx.JChannel for the specified org.jgroups.JChannel
Throws:
java.lang.Exception

registerChannel

public static JChannel registerChannel(JChannel channel,
                                       javax.management.MBeanServer server,
                                       java.lang.String name)
                                throws java.lang.Exception
Registers an already created channel with the MBeanServer. Creates an org.jgroups.jmx.JChannel which delegates to the org.jgroups.JChannel and registers it.

Parameters:
channel -
server -
name - The JMX ObjectName
Returns:
org.jgroups.jmx.JChannel for the specified org.jgroups.JChannel
Throws:
java.lang.Exception

unregisterChannel

public static void unregisterChannel(javax.management.MBeanServer server,
                                     javax.management.ObjectName name)
                              throws java.lang.Exception
Throws:
java.lang.Exception

unregisterChannel

public static void unregisterChannel(javax.management.MBeanServer server,
                                     java.lang.String name)
                              throws java.lang.Exception
Throws:
java.lang.Exception

registerChannelFactory

public static JChannelFactory registerChannelFactory(JChannelFactory factory,
                                                     javax.management.MBeanServer server,
                                                     java.lang.String name)
                                              throws java.lang.Exception
Throws:
java.lang.Exception

registerProtocols

public static void registerProtocols(javax.management.MBeanServer server,
                                     JChannel channel,
                                     java.lang.String prefix)
                              throws java.lang.Exception
Takes all protocols of an existing stack, creates corresponding MBean proxies and registers them with the MBean server

Parameters:
channel -
prefix -
Throws:
java.lang.Exception

unregisterProtocols

public static void unregisterProtocols(javax.management.MBeanServer server,
                                       JChannel channel,
                                       java.lang.String channel_name)

unregister

public static void unregister(javax.management.MBeanServer server,
                              java.lang.String object_name)
                       throws java.lang.Exception
Unregisters object_name and everything under it

Parameters:
object_name -
Throws:
java.lang.Exception

findProtocol

protected static Protocol findProtocol(Protocol prot)
                                throws java.lang.ClassNotFoundException,
                                       java.lang.IllegalAccessException,
                                       java.lang.InstantiationException
Throws:
java.lang.ClassNotFoundException
java.lang.IllegalAccessException
java.lang.InstantiationException


Copyright ? 1998-2006 Bela Ban. All Rights Reserved.