|
Apache JMeter | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.jmeter.visualizers.backend.AbstractBackendListenerClient
public abstract class AbstractBackendListenerClient
An abstract implementation of the BackendListenerClient 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 BackendListenerClient implementations. While it may be necessary to make changes to the BackendListenerClient 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 BackendListenerClient implementation, developers are encouraged to subclass this abstract class rather than implementing the BackendListenerClient interface directly. Implementing BackendListenerClient 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 BackendListenerClient.handleSampleResults(java.util.List, BackendListenerContext)
method of BackendListenerClient 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.
BackendListener.sampleOccurred(org.apache.jmeter.samplers.SampleEvent)
Constructor Summary | |
---|---|
AbstractBackendListenerClient()
|
Method Summary | |
---|---|
SampleResult |
createSampleResult(BackendListenerContext context,
SampleResult result)
Create a copy of SampleResult, this method is here to allow customizing what is kept in the copy, for example copy could remove some useless fields. |
Arguments |
getDefaultParameters()
Provide a list of parameters which this test supports. |
protected org.apache.log.Logger |
getLogger()
Get a Logger instance which can be used by subclasses to log information. |
protected Map<String,SamplerMetric> |
getMetricsPerSampler()
|
protected SamplerMetric |
getSamplerMetric(String sampleLabel)
|
protected UserMetric |
getUserMetrics()
|
void |
setupTest(BackendListenerContext context)
Do any initialization required by this client. |
void |
teardownTest(BackendListenerContext context)
Do any clean-up required at the end of a test run. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.apache.jmeter.visualizers.backend.BackendListenerClient |
---|
handleSampleResults |
Constructor Detail |
---|
public AbstractBackendListenerClient()
Method Detail |
---|
public void setupTest(BackendListenerContext context) throws Exception
BackendListenerClient
setupTest
in interface BackendListenerClient
context
- the context to run with. This provides access to
initialization parameters.
Context is readonly
Exception
- when setup failspublic void teardownTest(BackendListenerContext context) throws Exception
BackendListenerClient
teardownTest
in interface BackendListenerClient
context
- the context to run with. This provides access to
initialization parameters.
Exception
- when tear down failspublic Arguments getDefaultParameters()
BackendListenerClient
getDefaultParameters
in interface BackendListenerClient
protected org.apache.log.Logger getLogger()
public SampleResult createSampleResult(BackendListenerContext context, SampleResult result)
createSampleResult
in interface BackendListenerClient
context
- BackendListenerContext
result
- SampleResult
SampleResult
protected final SamplerMetric getSamplerMetric(String sampleLabel)
sampleLabel
- Name of sample used as key
SamplerMetric
protected Map<String,SamplerMetric> getMetricsPerSampler()
SamplerMetric
is the metrics of this Sampleprotected UserMetric getUserMetrics()
UserMetric
|
Apache JMeter | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |