Apache JMeter
2.0.1.20050615

org.apache.jmeter.testbeans
Class TestBean

java.lang.Object
  extended byorg.apache.jmeter.testelement.AbstractTestElement
      extended byorg.apache.jmeter.testbeans.TestBean
All Implemented Interfaces:
Cloneable, Serializable, TestElement
Direct Known Subclasses:
ConstantThroughputTimer, Example1, Example2

public abstract class TestBean
extends AbstractTestElement

This is an experimental class. An attempt to address the complexity of writing new JMeter components.

TestBean currently extends AbstractTestElement to support backward-compatibility, but the property-value-map may later on be separated from the test beans themselves. To ensure this will be doable with minimum damage, all inherited methods are deprecated.

Version:
$Revision: 1.9.2.1 $ updated on $Date: 2004/10/13 00:38:39 $
Author:
Jordi Salvat i Alabart
See Also:
Serialized Form

Field Summary
 
Fields inherited from interface org.apache.jmeter.testelement.TestElement
ENABLED, GUI_CLASS, NAME, TEST_CLASS
 
Constructor Summary
protected TestBean()
          Parameter-less constructor.
 
Method Summary
protected  void addProperty(JMeterProperty property)
          Deprecated.  
 void addTestElement(TestElement el)
          Deprecated.  
 void clear()
          Clear the TestElement of all data.
protected  void clearTemporary(JMeterProperty property)
          Deprecated.  
 Object clone()
          Deprecated.  
protected  void emptyTemporary()
          Deprecated.  
 boolean equals(Object o)
          Deprecated.  
 String getName()
          This one is NOT deprecated.
 JMeterProperty getProperty(String key)
          Get the named property.
 boolean getPropertyAsBoolean(String key)
          Return a property as a boolean value.
 boolean getPropertyAsBoolean(String key, boolean defaultVal)
          Deprecated.  
 double getPropertyAsDouble(String key)
          Deprecated.  
 float getPropertyAsFloat(String key)
          Deprecated.  
 int getPropertyAsInt(String key)
          Deprecated.  
 long getPropertyAsLong(String key)
          Deprecated.  
 String getPropertyAsString(String key)
          Deprecated.  
 boolean isRunningVersion()
          Returns the runningVersion.
 boolean isTemporary(JMeterProperty property)
          Test whether a given property is only a temporary resident of the TestElement
protected  void logProperties()
          Log the properties of the test element
protected  void mergeIn(TestElement element)
          Deprecated.  
protected  Sampler nextIsNull()
          Deprecated.  
 void prepare()
          Deprecated. to limit it's usage in expectation of moving it elsewhere.
 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)
          Deprecated.  
 void setName(String name)
          Deprecated.  
 void setProperty(JMeterProperty property)
          Sets and overwrites a property in the TestElement.
 void setProperty(String name, String value)
          Deprecated.  
 void setRunningVersion(boolean runningVersion)
          Sets the runningVersion.
 void setTemporary(JMeterProperty property)
          Indicate that the given property should be only a temporary property in the TestElement
 void traverse(TestElementTraverser traverser)
          Convenient way to traverse a test element.
protected  void traverseCollection(CollectionProperty col, TestElementTraverser traverser)
          Deprecated.  
protected  void traverseMap(MapProperty map, TestElementTraverser traverser)
          Deprecated.  
protected  void traverseProperty(TestElementTraverser traverser, JMeterProperty value)
          Deprecated.  
 
Methods inherited from class org.apache.jmeter.testelement.AbstractTestElement
canRemove, getThreadContext, getThreadName, setThreadContext, setThreadName, threadFinished, threadStarted
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TestBean

protected TestBean()
Parameter-less constructor.

This implementation will take care of obtaining bean-management information if this was not already done.

Method Detail

prepare

public void prepare()
Deprecated. to limit it's usage in expectation of moving it elsewhere.

Prepare the bean for work by populating the bean's properties from the property value map.


addProperty

protected void addProperty(JMeterProperty property)
Deprecated.  

Overrides:
addProperty in class AbstractTestElement
See Also:
AbstractTestElement.addProperty(org.apache.jmeter.testelement.property.JMeterProperty)

addTestElement

public void addTestElement(TestElement el)
Deprecated.  

Specified by:
addTestElement in interface TestElement
Overrides:
addTestElement in class AbstractTestElement
See Also:
TestElement.addTestElement(org.apache.jmeter.testelement.TestElement)

clear

public void clear()
Deprecated.  

Description copied from interface: TestElement
Clear the TestElement of all data.

Specified by:
clear in interface TestElement
Overrides:
clear in class AbstractTestElement
See Also:
TestElement.clear()

clearTemporary

protected void clearTemporary(JMeterProperty property)
Deprecated.  

Overrides:
clearTemporary in class AbstractTestElement
See Also:
AbstractTestElement.clearTemporary(org.apache.jmeter.testelement.property.JMeterProperty)

clone

public Object clone()
Deprecated.  

Specified by:
clone in interface TestElement
Overrides:
clone in class AbstractTestElement
See Also:
Object.clone()

emptyTemporary

protected void emptyTemporary()
Deprecated.  

Overrides:
emptyTemporary in class AbstractTestElement
See Also:
AbstractTestElement.emptyTemporary()

equals

public boolean equals(Object o)
Deprecated.  

Overrides:
equals in class AbstractTestElement
See Also:
Object.equals(java.lang.Object)

getName

public String getName()
This one is NOT deprecated.

Overrides:
getName in class AbstractTestElement
See Also:
AbstractTestElement.getName()

getProperty

public JMeterProperty getProperty(String key)
Deprecated.  

Description copied from class: AbstractTestElement
Get the named property. If it doesn't exist, a new NullProperty object is created with the same name and returned.

Specified by:
getProperty in interface TestElement
Overrides:
getProperty in class AbstractTestElement
See Also:
TestElement.getProperty(java.lang.String)

getPropertyAsBoolean

public boolean getPropertyAsBoolean(String key,
                                    boolean defaultVal)
Deprecated.  

Overrides:
getPropertyAsBoolean in class AbstractTestElement
See Also:
AbstractTestElement.getPropertyAsBoolean(java.lang.String, boolean)

getPropertyAsBoolean

public boolean getPropertyAsBoolean(String key)
Deprecated.  

Description copied from interface: TestElement
Return a property as a boolean value.

Specified by:
getPropertyAsBoolean in interface TestElement
Overrides:
getPropertyAsBoolean in class AbstractTestElement
See Also:
TestElement.getPropertyAsBoolean(java.lang.String)

getPropertyAsDouble

public double getPropertyAsDouble(String key)
Deprecated.  

Overrides:
getPropertyAsDouble in class AbstractTestElement
See Also:
AbstractTestElement.getPropertyAsDouble(java.lang.String)

getPropertyAsFloat

public float getPropertyAsFloat(String key)
Deprecated.  

Specified by:
getPropertyAsFloat in interface TestElement
Overrides:
getPropertyAsFloat in class AbstractTestElement
See Also:
TestElement.getPropertyAsFloat(java.lang.String)

getPropertyAsInt

public int getPropertyAsInt(String key)
Deprecated.  

Specified by:
getPropertyAsInt in interface TestElement
Overrides:
getPropertyAsInt in class AbstractTestElement
See Also:
TestElement.getPropertyAsInt(java.lang.String)

getPropertyAsLong

public long getPropertyAsLong(String key)
Deprecated.  

Specified by:
getPropertyAsLong in interface TestElement
Overrides:
getPropertyAsLong in class AbstractTestElement
See Also:
TestElement.getPropertyAsLong(java.lang.String)

getPropertyAsString

public String getPropertyAsString(String key)
Deprecated.  

Specified by:
getPropertyAsString in interface TestElement
Overrides:
getPropertyAsString in class AbstractTestElement
See Also:
TestElement.getPropertyAsString(java.lang.String)

isRunningVersion

public boolean isRunningVersion()
Deprecated.  

Description copied from class: AbstractTestElement
Returns the runningVersion.

Specified by:
isRunningVersion in interface TestElement
Overrides:
isRunningVersion in class AbstractTestElement
See Also:
TestElement.isRunningVersion()

isTemporary

public boolean isTemporary(JMeterProperty property)
Deprecated.  

Description copied from interface: TestElement
Test whether a given property is only a temporary resident of the TestElement

Specified by:
isTemporary in interface TestElement
Overrides:
isTemporary in class AbstractTestElement
See Also:
TestElement.isTemporary(org.apache.jmeter.testelement.property.JMeterProperty)

logProperties

protected void logProperties()
Deprecated.  

Description copied from class: AbstractTestElement
Log the properties of the test element

Overrides:
logProperties in class AbstractTestElement
See Also:
AbstractTestElement.logProperties()

mergeIn

protected void mergeIn(TestElement element)
Deprecated.  

Overrides:
mergeIn in class AbstractTestElement
See Also:
AbstractTestElement.mergeIn(org.apache.jmeter.testelement.TestElement)

nextIsNull

protected Sampler nextIsNull()
                      throws NextIsNullException
Deprecated.  

Overrides:
nextIsNull in class AbstractTestElement
Throws:
NextIsNullException
See Also:
AbstractTestElement.nextIsNull()

propertyIterator

public PropertyIterator propertyIterator()
Deprecated.  

Description copied from interface: TestElement
Get a Property Iterator for the TestElements properties.

Specified by:
propertyIterator in interface TestElement
Overrides:
propertyIterator in class AbstractTestElement
See Also:
TestElement.propertyIterator()

recoverRunningVersion

public void recoverRunningVersion()
Deprecated.  

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
Overrides:
recoverRunningVersion in class AbstractTestElement
See Also:
TestElement.recoverRunningVersion()

removeProperty

public void removeProperty(String key)
Deprecated.  

Specified by:
removeProperty in interface TestElement
Overrides:
removeProperty in class AbstractTestElement
See Also:
TestElement.removeProperty(java.lang.String)

setName

public void setName(String name)
Deprecated.  

Overrides:
setName in class AbstractTestElement
See Also:
AbstractTestElement.setName(java.lang.String)

setProperty

public void setProperty(JMeterProperty property)
Deprecated.  

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
Overrides:
setProperty in class AbstractTestElement
See Also:
TestElement.setProperty(org.apache.jmeter.testelement.property.JMeterProperty)

setProperty

public void setProperty(String name,
                        String value)
Deprecated.  

Specified by:
setProperty in interface TestElement
Overrides:
setProperty in class AbstractTestElement
See Also:
TestElement.setProperty(java.lang.String, java.lang.String)

setRunningVersion

public void setRunningVersion(boolean runningVersion)
Deprecated.  

Description copied from class: AbstractTestElement
Sets the runningVersion.

Specified by:
setRunningVersion in interface TestElement
Overrides:
setRunningVersion in class AbstractTestElement
Parameters:
runningVersion - the runningVersion to set
See Also:
TestElement.setRunningVersion(boolean)

setTemporary

public void setTemporary(JMeterProperty property)
Deprecated.  

Description copied from interface: TestElement
Indicate that the given property should be only a temporary property in the TestElement

Specified by:
setTemporary in interface TestElement
Overrides:
setTemporary in class AbstractTestElement
See Also:
TestElement.setTemporary(org.apache.jmeter.testelement.property.JMeterProperty)

traverse

public void traverse(TestElementTraverser traverser)
Deprecated.  

Description copied from interface: TestElement
Convenient way to traverse a test element.

Specified by:
traverse in interface TestElement
Overrides:
traverse in class AbstractTestElement
See Also:
TestElement.traverse(org.apache.jmeter.testelement.TestElementTraverser)

traverseCollection

protected void traverseCollection(CollectionProperty col,
                                  TestElementTraverser traverser)
Deprecated.  

Overrides:
traverseCollection in class AbstractTestElement
See Also:
AbstractTestElement.traverseCollection(org.apache.jmeter.testelement.property.CollectionProperty, org.apache.jmeter.testelement.TestElementTraverser)

traverseMap

protected void traverseMap(MapProperty map,
                           TestElementTraverser traverser)
Deprecated.  

Overrides:
traverseMap in class AbstractTestElement
See Also:
AbstractTestElement.traverseMap(org.apache.jmeter.testelement.property.MapProperty, org.apache.jmeter.testelement.TestElementTraverser)

traverseProperty

protected void traverseProperty(TestElementTraverser traverser,
                                JMeterProperty value)
Deprecated.  

Overrides:
traverseProperty in class AbstractTestElement
See Also:
AbstractTestElement.traverseProperty(org.apache.jmeter.testelement.TestElementTraverser, org.apache.jmeter.testelement.property.JMeterProperty)

Apache JMeter
2.0.1.20050615

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