org.apache.tools.ant.taskdefs.optional.jmx.connector.jboss.ejb
Class Connector

java.lang.Object
  |
  +--org.apache.tools.ant.taskdefs.optional.jmx.connector.AbstractJMXConnector
        |
        +--org.apache.tools.ant.taskdefs.optional.jmx.connector.jboss.ejb.Connector
All Implemented Interfaces:
JMXConnector

public class Connector
extends AbstractJMXConnector

JBoss specific implementation of JMXConnector. Allows Ant-JMX taskdefs to lookup JBoss servers via JNDI and connect to a MBeanServer using the EJB JMX adaptor.

Version:
$Id: Connector.java,v 1.2 2003/05/26 10:12:23 bdueck Exp $
Author:
Eric Jain

Constructor Summary
Connector()
           
 
Method Summary
 java.util.Hashtable getInitialContextProperties(java.util.Hashtable contextProps)
          This implementation returns the contextProps unmodified.
 javax.management.MBeanServer getMBeanServer(javax.naming.Context context, java.lang.String jndiName)
          Connects to a JMX server and returns the MBeanServer to use during task execution.
 javax.management.MBeanServer getMBeanServer(java.util.Hashtable contextProps, java.lang.String jndiName)
          Connects to a JMX server and returns the MBeanServer to use during task execution.
protected  void setSecurity(java.util.Hashtable contextProps)
           
 
Methods inherited from class org.apache.tools.ant.taskdefs.optional.jmx.connector.AbstractJMXConnector
createMBean, getActiveDomain, getInitialContextProperties
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Connector

public Connector()
Method Detail

getInitialContextProperties

public java.util.Hashtable getInitialContextProperties(java.util.Hashtable contextProps)
Description copied from class: AbstractJMXConnector
This implementation returns the contextProps unmodified.
Overrides:
getInitialContextProperties in class AbstractJMXConnector

getMBeanServer

public javax.management.MBeanServer getMBeanServer(java.util.Hashtable contextProps,
                                                   java.lang.String jndiName)
                                            throws org.apache.tools.ant.BuildException
Description copied from interface: JMXConnector
Connects to a JMX server and returns the MBeanServer to use during task execution. The caller is responsible for invoking this method prior to invoking createMBean() or getActiveDomain() methods on this interface. The getInitialContextProperties() method will be invoked prior to this method.
Overrides:
getMBeanServer in class AbstractJMXConnector
Following copied from interface: org.apache.tools.ant.taskdefs.optional.jmx.connector.JMXConnector
Parameters:
context - The set of properties used to locate and connect to the JMX server.
jndiLookupName - The JNDI entry name for the MBeanServer.

getMBeanServer

public javax.management.MBeanServer getMBeanServer(javax.naming.Context context,
                                                   java.lang.String jndiName)
                                            throws javax.naming.NamingException,
                                                   org.apache.tools.ant.BuildException
Description copied from class: AbstractJMXConnector
Connects to a JMX server and returns the MBeanServer to use during task execution. The caller is responsible for invoking this method prior to invoking createMBean() or getActiveDomain() methods on this interface. The getInitialContextProperties() method will be invoked prior to this method.
Overrides:
getMBeanServer in class AbstractJMXConnector
Following copied from class: org.apache.tools.ant.taskdefs.optional.jmx.connector.AbstractJMXConnector
Parameters:
context - The JNDI naming context to use to lookup the jndiLookupName entry. The caller is responsible for closing this context.
jndiLookupName - The JNDI entry name for the MBeanServer.

setSecurity

protected void setSecurity(java.util.Hashtable contextProps)