org.apache.tools.ant.types.optional
Class ContextType

java.lang.Object
  |
  +--org.apache.tools.ant.ProjectComponent
        |
        +--org.apache.tools.ant.types.DataType
              |
              +--org.apache.tools.ant.types.optional.ContextType
All Implemented Interfaces:
java.lang.Cloneable
Direct Known Subclasses:
MBeanType

public class ContextType
extends org.apache.tools.ant.types.DataType
implements java.lang.Cloneable

This is an Ant type that represents a JNDI context, and optionally can carry the name of a specific entry within a JNDI tree.

Version:
$Version$
Author:
Brian Dueck

Field Summary
static java.lang.String DATA_TYPE_NAME
           
 
Fields inherited from class org.apache.tools.ant.types.DataType
checked, description, ref
 
Fields inherited from class org.apache.tools.ant.ProjectComponent
project
 
Constructor Summary
ContextType()
           
 
Method Summary
 java.lang.String getJndiName()
          Getter for property jndiName.
 java.lang.String getPassword()
          Getter for property password.
 java.lang.String getProviderUrl()
          Getter for property providerUrl.
 java.lang.String getServerType()
          Getter for property serverType.
 java.lang.String getUser()
          Getter for property user.
 void setJndiName(java.lang.String jndiName)
          Sets the jndiName attribute for the JNDI object.
 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)
          The type of server involved.
 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.types.DataType
circularReference, dieOnCircularReference, getCheckedRef, getDescription, isReference, noChildrenAllowed, setDescription, setRefid, tooManyAttributes
 
Methods inherited from class org.apache.tools.ant.ProjectComponent
getProject, log, log, setProject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DATA_TYPE_NAME

public static final java.lang.String DATA_TYPE_NAME
Constructor Detail

ContextType

public ContextType()
Method Detail

getServerType

public java.lang.String getServerType()
Getter for property serverType.
Returns:
Value of property serverType.

setServerType

public void setServerType(java.lang.String serverType)
The type of server involved. Supported values are weblogic or jboss. The setting of this value determines the default value for the jndiName and providerUrl attributes.

NOTE:If this value is other than weblogic or jboss, then it is assumed to be a fully qualified class name that implements org.apache.tools.ant.taskdefs.optional.jmx.connector.JMXConnector. This is used to support additional types of servers without modifying the Ant task classes.
See Also:
JMXConnector

getProviderUrl

public java.lang.String getProviderUrl()
Getter for property providerUrl.
Returns:
Value of property providerUrl.

setProviderUrl

public void setProviderUrl(java.lang.String providerUrl)
Sets the providerUrl attribute for the JNDI provider. If serverType is set to weblogic, the default value is t3://localhost:7001. If serverType is set to jboss, the default value is jnp://localhost:1099. e.g. The default value for BEA WebLogic Server is t3://localhost:7001.
Parameters:
providerUrl - The providerUrl of the JNDI provder.

getUser

public java.lang.String getUser()
Getter for property user.
Returns:
Value of property user.

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.

getPassword

public java.lang.String getPassword()
Getter for property password.
Returns:
Value of property password.

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

getJndiName

public java.lang.String getJndiName()
Getter for property jndiName.
Returns:
Value of property jndiName.

setJndiName

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