JTR 5.0 API Documentation

jtr.ant
Class JtrRun

java.lang.Object
  extended by org.apache.tools.ant.ProjectComponent
      extended by org.apache.tools.ant.Task
          extended by org.apache.tools.ant.taskdefs.Java
              extended by jtr.ant.JtrRun
All Implemented Interfaces:
java.lang.Cloneable
Direct Known Subclasses:
JtrPassive

public class JtrRun
extends org.apache.tools.ant.taskdefs.Java

Ant task for running a JTR active node. Being derived from the Java Ant-task, JtrRun accepts all the attributes and sub-elements the former task accepts. Moreover it also accepts the following ad-hoc attributes:

  1. jtr, the relative path to the jtr.xml file (compulsory)
  2. host, the name or IP address of the host running the JTR node (required only in EDiT-mode)
  3. registryPort, the TCP port the RMI-registry must be attached to (required only in EDiT-mode)
  4. classLoaderPort, the TCP port the server class-loader must be attached to (required only in EDiT-mode)
  5. outcomeCollectorPort, the TCP port the test-outcome collector must be attached to (required only in EDiT-mode)
  6. policy, a standard Java policy-file (compulsory)
  7. log4j, the relative path to the Log4J configuration file (compulsory)

Since:
5.0
Version:
5.0
Author:
frusso

Field Summary
static java.lang.String ACTIVE_NODE_MAIN_CLASS
           
 
Fields inherited from class org.apache.tools.ant.taskdefs.Java
redirector, redirectorElement
 
Fields inherited from class org.apache.tools.ant.Task
target, taskName, taskType, wrapper
 
Fields inherited from class org.apache.tools.ant.ProjectComponent
description, location, project
 
Constructor Summary
JtrRun()
           
 
Method Summary
 void execute()
          
 java.lang.String getLog4j()
          Get the Log4J configuration file.
protected  void readAdHocJtrJvmArgs(java.lang.StringBuilder params)
          Read specific JVM args.
protected  void readCommonJtrJvmArgs(java.lang.StringBuilder params)
          Read common JVM args.
 void setClassLoaderPort(java.lang.String classLoaderPort)
          Set the TCP port the class loader listens to.
 void setHost(java.lang.String host)
          Set the host-name or IP address
 void setJtr(java.lang.String jtr)
          Set the configuration file.
 void setLog4j(java.lang.String log4j)
          Set the Log4J configuration file.
protected  void setMainClass()
          Set the main class.
 void setOutcomeCollectorPort(java.lang.String outcomeCollectorPort)
          Set the TCP port the outcome-collector listens to.
 void setPolicy(java.lang.String policy)
          Set the Java policy file.
 void setRegistryPort(java.lang.String port)
          Set the registry TCP port
 
Methods inherited from class org.apache.tools.ant.taskdefs.Java
addAssertions, addConfiguredRedirector, addEnv, addSysproperty, addSyspropertyset, clearArgs, createArg, createBootclasspath, createClasspath, createJvmarg, createPermissions, createWatchdog, executeJava, getCommandLine, getSysProperties, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, maybeSetResultPropertyValue, run, setAppend, setArgs, setClassname, setClasspath, setClasspathRef, setCloneVm, setDir, setError, setErrorProperty, setFailonerror, setFork, setInput, setInputString, setJar, setJvm, setJvmargs, setJVMVersion, setLogError, setMaxmemory, setNewenvironment, setOutput, setOutputproperty, setResultProperty, setSpawn, setTimeout, setupRedirector
 
Methods inherited from class org.apache.tools.ant.Task
bindToOwner, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, init, isInvalid, log, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType
 
Methods inherited from class org.apache.tools.ant.ProjectComponent
clone, getDescription, getLocation, getProject, setDescription, setLocation, setProject
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ACTIVE_NODE_MAIN_CLASS

public static final java.lang.String ACTIVE_NODE_MAIN_CLASS
Constructor Detail

JtrRun

public JtrRun()
Method Detail

execute

public void execute()
             throws org.apache.tools.ant.BuildException

Overrides:
execute in class org.apache.tools.ant.taskdefs.Java
Throws:
org.apache.tools.ant.BuildException

readAdHocJtrJvmArgs

protected void readAdHocJtrJvmArgs(java.lang.StringBuilder params)
Read specific JVM args.

Parameters:
params - The JVM args

readCommonJtrJvmArgs

protected void readCommonJtrJvmArgs(java.lang.StringBuilder params)
Read common JVM args.

Parameters:
params - The JVM args

setMainClass

protected void setMainClass()
Set the main class.


setJtr

public void setJtr(java.lang.String jtr)
Set the configuration file.

Parameters:
jtr - The configuration file

setHost

public void setHost(java.lang.String host)
Set the host-name or IP address

Parameters:
host - The host to set

setRegistryPort

public void setRegistryPort(java.lang.String port)
Set the registry TCP port

Parameters:
registryPort - The registryPort to set

setPolicy

public void setPolicy(java.lang.String policy)
Set the Java policy file.

Parameters:
policy - The policy to set

getLog4j

public java.lang.String getLog4j()
Get the Log4J configuration file.

Returns:
the log4j

setLog4j

public void setLog4j(java.lang.String log4j)
Set the Log4J configuration file.

Parameters:
log4j - The log4j to set

setClassLoaderPort

public void setClassLoaderPort(java.lang.String classLoaderPort)
Set the TCP port the class loader listens to.

Parameters:
classLoaderPort - The classloader port to set

setOutcomeCollectorPort

public void setOutcomeCollectorPort(java.lang.String outcomeCollectorPort)
Set the TCP port the outcome-collector listens to.

Parameters:
outcomeCollectorPort - The outcome-collector port to set

The JTR Project is licensed under GPL version 2