Apache JMeter
1.9

org.apache.jmeter.testelement
Class AbstractTestElement

java.lang.Object
  |
  +--org.apache.jmeter.testelement.AbstractTestElement
All Implemented Interfaces:
Cloneable, Serializable, TestElement
Direct Known Subclasses:
AbstractListenerElement, AbstractSampler, AnchorModifier, Argument, Authorization, ConfigTestElement, ConstantThroughputTimer, ConstantTimer, Cookie, CounterConfig, DurationAssertion, GenericController, Header, MailerModel, ParamMask, ParamModifier, RegexExtractor, RemoteListenerWrapper, RemoteSampleListenerWrapper, RemoteTestListenerWrapper, ResponseAssertion, SizeAssertion, TestPlan, ThreadGroup, URLRewritingModifier, UserParameters, WorkBench, XMLAssertion

public abstract class AbstractTestElement
extends Object
implements TestElement, Serializable

Version:
$Revision: 1.24 $
Author:
Michael Stover
See Also:
Serialized Form

Field Summary
protected static org.apache.log.Logger log
           
 
Fields inherited from interface org.apache.jmeter.testelement.TestElement
ENABLED, GUI_CLASS, NAME, TEST_CLASS
 
Constructor Summary
AbstractTestElement()
           
 
Method Summary
protected  void addProperty(JMeterProperty property)
           
 void addTestElement(TestElement el)
           
 void clear()
          Clear the TestElement of all data.
 Object clone()
           
 boolean equals(Object o)
           
 String getName()
           
 JMeterProperty getProperty(String key)
          Get the named property.
 boolean getPropertyAsBoolean(String key)
          Return a property as a boolean value.
 double getPropertyAsDouble(String key)
           
 float getPropertyAsFloat(String key)
           
 int getPropertyAsInt(String key)
           
 long getPropertyAsLong(String key)
           
 String getPropertyAsString(String key)
           
 boolean isRunningVersion()
          Returns the runningVersion.
protected  void logProperties()
          Log the properties of the test element
protected  void mergeIn(TestElement element)
           
protected  Sampler nextIsNull()
           
 PropertyIterator propertyIterator()
          Get a Property Iterator for the TestElements properties.
 void recoverRunningVersion()
          Tells the test element to return to the state it was in when makeRunningVersion() was called.
 void removeProperty(String key)
           
 void setName(String name)
           
 void setProperty(JMeterProperty property)
          Sets and overwrites a property in the TestElement.
 void setProperty(String name, String value)
           
 void setRunningVersion(boolean runningVersion)
          Sets the runningVersion.
 void traverse(TestElementTraverser traverser)
          Convenient way to traverse a test element.
protected  void traverseCollection(CollectionProperty col, TestElementTraverser traverser)
           
protected  void traverseMap(MapProperty map, TestElementTraverser traverser)
           
protected  void traverseProperty(TestElementTraverser traverser, JMeterProperty value)
           
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected static org.apache.log.Logger log
Constructor Detail

AbstractTestElement

public AbstractTestElement()
Method Detail

clone

public Object clone()
Specified by:
clone in interface TestElement
Overrides:
clone in class Object

clear

public void clear()
Description copied from interface: TestElement
Clear the TestElement of all data.

Specified by:
clear in interface TestElement

removeProperty

public void removeProperty(String key)
Specified by:
removeProperty in interface TestElement

equals

public boolean equals(Object o)
Overrides:
equals in class Object

addTestElement

public void addTestElement(TestElement el)
Specified by:
addTestElement in interface TestElement

setName

public void setName(String name)

getName

public String getName()

getProperty

public JMeterProperty getProperty(String key)
Get the named property. If it doesn't exist, a NullProperty object is returned.

Specified by:
getProperty in interface TestElement

traverse

public void traverse(TestElementTraverser traverser)
Description copied from interface: TestElement
Convenient way to traverse a test element.

Specified by:
traverse in interface TestElement

traverseProperty

protected void traverseProperty(TestElementTraverser traverser,
                                JMeterProperty value)

traverseMap

protected void traverseMap(MapProperty map,
                           TestElementTraverser traverser)

traverseCollection

protected void traverseCollection(CollectionProperty col,
                                  TestElementTraverser traverser)

getPropertyAsInt

public int getPropertyAsInt(String key)
Specified by:
getPropertyAsInt in interface TestElement

getPropertyAsBoolean

public boolean getPropertyAsBoolean(String key)
Description copied from interface: TestElement
Return a property as a boolean value.

Specified by:
getPropertyAsBoolean in interface TestElement

getPropertyAsFloat

public float getPropertyAsFloat(String key)
Specified by:
getPropertyAsFloat in interface TestElement

getPropertyAsLong

public long getPropertyAsLong(String key)
Specified by:
getPropertyAsLong in interface TestElement

getPropertyAsDouble

public double getPropertyAsDouble(String key)

getPropertyAsString

public String getPropertyAsString(String key)
Specified by:
getPropertyAsString in interface TestElement

addProperty

protected void addProperty(JMeterProperty property)

logProperties

protected void logProperties()
Log the properties of the test element

See Also:
TestElement.setProperty(JMeterProperty)

setProperty

public void setProperty(JMeterProperty property)
Description copied from interface: TestElement
Sets and overwrites a property in the TestElement. This call will be ignored if the TestElement is currently a "running version".

Specified by:
setProperty in interface TestElement

setProperty

public void setProperty(String name,
                        String value)
Specified by:
setProperty in interface TestElement

propertyIterator

public PropertyIterator propertyIterator()
Description copied from interface: TestElement
Get a Property Iterator for the TestElements properties.

Specified by:
propertyIterator in interface TestElement
Returns:
PropertyIterator

mergeIn

protected void mergeIn(TestElement element)

isRunningVersion

public boolean isRunningVersion()
Returns the runningVersion.

Specified by:
isRunningVersion in interface TestElement

setRunningVersion

public void setRunningVersion(boolean runningVersion)
Sets the runningVersion.

Specified by:
setRunningVersion in interface TestElement
Parameters:
runningVersion - the runningVersion to set

recoverRunningVersion

public void recoverRunningVersion()
Description copied from interface: TestElement
Tells the test element to return to the state it was in when makeRunningVersion() was called.

Specified by:
recoverRunningVersion in interface TestElement

nextIsNull

protected Sampler nextIsNull()
                      throws NextIsNullException
NextIsNullException

Apache JMeter
1.9

Copyright © 1998-2003 Apache Software Foundation. All Rights Reserved.