org.apache.jmeter.visualizers
Class MonitorAccumModel
- Clearable, Serializable
public class MonitorAccumModel
MonitorAccumModel
public MonitorAccumModel()
addListener
public void addListener(MonitorListener listener)
Add a listener. When samples are added, the class will notify the
listener of the change.
addSample
public void addSample(SampleResult sample)
Method will try to parse the response data. If the request was a monitor
request, but the response was incomplete, bad or the server refused the
connection, we will set the server's health to "dead". If the request was
not a monitor sample, the method will ignore it.
addSample
public void addSample(MonitorModel model)
Method will look up the server in the map. The MonitorModel will be added
to an existing list, or a new one will be created.
clearData
public void clearData()
Clears everything except the listener. Do not clear the listeners. If we
clear listeners, subsequent "run" will not notify the gui of data
changes.
- clearData in interface Clearable
createNewMonitorModel
public MonitorModel createNewMonitorModel(URL url)
Method will return a new MonitorModel object with the given URL. This is
used when the server fails to respond fully, or is dead.
getAllSamples
public List getAllSamples(String url)
Get all MonitorModels matching the URL.
getBufferSize
public int getBufferSize()
getLastSample
public MonitorModel getLastSample()
Added this method we that we can save the calculated stats.
getSample
public MonitorModel getSample(String url)
Get the MonitorModel matching the url.
noResponse
public void noResponse(URL url)
If there is no response from the server, we create a new MonitorStats
object with the current timestamp and health "dead".
notifyListeners
public void notifyListeners(MonitorModel model)
notify the listeners with the MonitorModel object.
setBufferSize
public void setBufferSize(int buffer)
setPrefix
public void setPrefix(String prefix)
Copyright © 1998-2010 Apache Software Foundation. All Rights Reserved.