org.apache.tools.ant.taskdefs.optional.jmx.connector
Class JMXConnectorFactory

java.lang.Object
  |
  +--org.apache.tools.ant.taskdefs.optional.jmx.connector.JMXConnectorFactory

public class JMXConnectorFactory
extends java.lang.Object

Instantiates the appropriate JMXConnector implementation based on the JMX serverType.

Version:
$Id: JMXConnectorFactory.java,v 1.3 2003/05/28 22:28:26 bdueck Exp $
Author:
Brian Dueck

Method Summary
static JMXConnector createConnector(java.lang.String serverType)
          Return the appropriate implementation of JMXConnector for the specified JMX server type (e.g.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

createConnector

public static JMXConnector createConnector(java.lang.String serverType)
                                    throws java.lang.ClassNotFoundException,
                                           java.lang.InstantiationException,
                                           java.lang.IllegalAccessException
Return the appropriate implementation of JMXConnector for the specified JMX server type (e.g. jboss, weblogic, etc.).

This implementation will locate the JMXConnector implementation by first using the serverType argument as part of the package name according to the following template: org.apache.tools.ant.taskdefs.optional.jmx.connector..Connector

If this technique fails to find a class that implements JMXConnector, then it is assumed that serverType is the fully qualified class name for the JMXConnector implementation (e.g. serverType = org.someone.MyJMXServer).