org.apache.tools.ant.taskdefs.optional.jmx
Class AbstractManagementTask

java.lang.Object
  |
  +--org.apache.tools.ant.ProjectComponent
        |
        +--org.apache.tools.ant.Task
              |
              +--org.apache.tools.ant.taskdefs.optional.jmx.AbstractManagementTask
Direct Known Subclasses:
AbstractMBeanTask, JndiLookup

public abstract class AbstractManagementTask
extends org.apache.tools.ant.Task

This is the abstract base class for Ant JMX mbean tasks. Implementations of AbstractMBean inherit its attributes (see below) for connecting to the JMX MBean server.

Refer to the user documentation for more information and examples on how to use this task.

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

Fields inherited from class org.apache.tools.ant.Task
description, location, target, taskName, taskType, wrapper
 
Fields inherited from class org.apache.tools.ant.ProjectComponent
project
 
Constructor Summary
AbstractManagementTask()
           
 
Method Summary
protected  ContextType getContext()
           
protected  boolean getFailOnError()
          The action to take if an error is detected while processing this task.
protected  java.lang.String getJndiName()
          The JNDI entry name of the MBeanServer
protected  java.lang.String getPassword()
           
protected  java.lang.String getProviderUrl()
          The url for the JNDI provider.
protected  java.lang.String getUser()
           
protected  void setContext(ContextType context)
           
 void setContextRef(org.apache.tools.ant.types.Reference ref)
           
 void setFailOnError(boolean failOnError)
          Sets the failOnError attribute.
 void setJndiName(java.lang.String jndiName)
          Sets the jndiName attribute for the JMX MBeanHome.
 void setPassword(java.lang.String password)
          Sets the password attribute to use for authentication with the JMX server.
 void setProviderUrl(java.lang.String providerUrl)
          Sets the providerUrl attribute for the JNDI provider.
 void setServerType(java.lang.String serverType)
          Sets the JMX serverType to be used.
 void setUser(java.lang.String user)
          Sets the user attribute to use for authentication with the JMX server.
 
Methods inherited from class org.apache.tools.ant.Task
execute, getDescription, getLocation, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, handleErrorOutput, handleOutput, init, isInvalid, log, log, maybeConfigure, perform, setDescription, setLocation, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName
 
Methods inherited from class org.apache.tools.ant.ProjectComponent
getProject, setProject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractManagementTask

public AbstractManagementTask()
Method Detail

setContext

protected void setContext(ContextType context)

getContext

protected ContextType getContext()

setServerType

public void setServerType(java.lang.String serverType)
Sets the JMX serverType to be used. See JMXConnectorFactory to understand how this value is used.
See Also:
JMXConnector

setProviderUrl

public void setProviderUrl(java.lang.String providerUrl)
Sets the providerUrl attribute for the JNDI provider.
Parameters:
providerUrl - The providerUrl of the JNDI provder. e.g. The default value for BEA WebLogic Server is t3://localhost:7001.

setJndiName

public void setJndiName(java.lang.String jndiName)
Sets the jndiName attribute for the JMX MBeanHome.
Parameters:
jndiName - The jndi name of the JMX server home. e.g. The default value for BEA Admin home is weblogic.management.adminhome.

setUser

public void setUser(java.lang.String user)
Sets the user attribute to use for authentication with the JMX server.
Parameters:
user - The user-id to use for authentication with the JMX server.

setPassword

public void setPassword(java.lang.String password)
Sets the password attribute to use for authentication with the JMX server.
Parameters:
password - The password to use

setFailOnError

public void setFailOnError(boolean failOnError)
Sets the failOnError attribute. If false (default), processing will continue even if an error is detected. Examples of an error are trying to retrieve a non-existent attribute with getAttribute or trying to set an attribute value with an incorrect type.
Parameters:
failOnError - Behaviour that should happen if an error is detected.

getJndiName

protected java.lang.String getJndiName()
The JNDI entry name of the MBeanServer
Returns:
The JNDI name of the MBeanServer.

getFailOnError

protected boolean getFailOnError()
The action to take if an error is detected while processing this task.
Returns:
true if a task should fail if an error is detected.

getProviderUrl

protected java.lang.String getProviderUrl()
The url for the JNDI provider.
Returns:
The current JNDI provider URL.

getUser

protected java.lang.String getUser()

getPassword

protected java.lang.String getPassword()

setContextRef

public void setContextRef(org.apache.tools.ant.types.Reference ref)