Home » jakarta-jmeter-2.3.4_src » org.apache.jmeter.protocol.java.sampler » [javadoc | source]
abstract public class: AbstractJavaSamplerClient [javadoc | source]

All Implemented Interfaces:

Direct Known Subclasses:
    JavaTest, ErrorSamplerClient, SleepTest

An abstract implementation of the JavaSamplerClient interface. This implementation provides default implementations of most of the methods in the interface, as well as some convenience methods, in order to simplify development of JavaSamplerClient implementations.

See org.apache.jmeter.protocol.java.test.SleepTest for an example of how to extend this class.

While it may be necessary to make changes to the JavaSamplerClient interface from time to time (therefore requiring changes to any implementations of this interface), we intend to make this abstract class provide reasonable implementations of any new methods so that subclasses do not necessarily need to be updated for new versions. Therefore, when creating a new JavaSamplerClient implementation, developers are encouraged to subclass this abstract class rather than implementing the JavaSamplerClient interface directly. Implementing JavaSamplerClient directly will continue to be supported for cases where extending this class is not possible (for example, when the client class is already a subclass of some other class).

The runTest() method of JavaSamplerClient does not have a default implementation here, so subclasses must define at least this method. It may be useful to override other methods as well.

Method from org.apache.jmeter.protocol.java.sampler.AbstractJavaSamplerClient Summary:
getDefaultParameters,   getLogger,   setupTest,   teardownTest
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.jmeter.protocol.java.sampler.AbstractJavaSamplerClient Detail:
 public Arguments getDefaultParameters() 
 protected Logger getLogger() 
    Get a Logger instance which can be used by subclasses to log information. This is the same Logger which is used by the base JavaSampler classes (jmeter.protocol.java).
 public  void setupTest(JavaSamplerContext context) 
 public  void teardownTest(JavaSamplerContext context)