org.apache.tools.ant.taskdefs.optional.jmx.connector.weblogic
Class Connector

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

public class Connector
extends AbstractJMXConnector

WebLogic specific implementation of JMXConnector. Allows Ant-JMX taskdefs to lookup WebLogic servers via JNDI and connect to a MBeanServer via t3 or an alternate protocol.

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

Constructor Summary
Connector()
          Creates a new instance of WebLogicAdaptor
 
Method Summary
 javax.management.ObjectName createMBean(java.lang.String type, javax.management.ObjectName objectName, javax.management.MBeanServer mbserver)
          This implementation simply calls mbserver.createMBean().
 java.lang.String getActiveDomain(javax.management.MBeanServer mbserver)
          This implementation returns mbserver.getDefaultDomain() as the active/default domain.
 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.
 
Methods inherited from class org.apache.tools.ant.taskdefs.optional.jmx.connector.AbstractJMXConnector
getInitialContextProperties, getMBeanServer
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Connector

public Connector()
Creates a new instance of WebLogicAdaptor
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(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.

createMBean

public javax.management.ObjectName createMBean(java.lang.String type,
                                               javax.management.ObjectName objectName,
                                               javax.management.MBeanServer mbserver)
                                        throws javax.management.MBeanRegistrationException
Description copied from class: AbstractJMXConnector
This implementation simply calls mbserver.createMBean().
Overrides:
createMBean in class AbstractJMXConnector
Following copied from interface: org.apache.tools.ant.taskdefs.optional.jmx.connector.JMXConnector
Parameters:
type - The type or classname of the MBean to create.
objectName - The name of the MBean to create.
mbserver - The server where the new MBean will be created.

getActiveDomain

public java.lang.String getActiveDomain(javax.management.MBeanServer mbserver)
Description copied from class: AbstractJMXConnector
This implementation returns mbserver.getDefaultDomain() as the active/default domain.
Overrides:
getActiveDomain in class AbstractJMXConnector