org.apache.jmeter.visualizers

Class MailerVisualizer

Implemented Interfaces:
ActionListener, ChangeListener, Clearable, JMeterGUIComponent, Printable, UnsharedComponent, Visualizer

public class MailerVisualizer
extends AbstractVisualizer
implements ActionListener, Clearable, ChangeListener

This class implements a visualizer that mails a message when an error occurs.

Field Summary

Fields inherited from class org.apache.jmeter.visualizers.gui.AbstractVisualizer

collector, isStats

Fields inherited from class org.apache.jmeter.gui.AbstractJMeterGuiComponent

namePanel

Constructor Summary

MailerVisualizer()
Constructs the MailerVisualizer and initializes its GUI.

Method Summary

void
actionPerformed(ActionEvent e)
Reacts on an ActionEvent (like pressing a button).
void
add(SampleResult res)
This method is called by sampling thread to inform the visualizer about the arrival of a new sample.
void
clearData()
Clears any stored sampling-informations.
void
configure(TestElement el)
Restores MailerVisualizer.
TestElement
createTestElement()
Makes MailerVisualizer storable.
String
getAttributesTitle()
Returns a String for the title of the attributes-panel as set up in the properties-file using the lookup-constant "mailer_attributes_panel".
JPanel
getControlPanel()
String
getLabelResource()
Get the component's resource name, which getStaticLabel uses to derive the component's label in the local language.
void
modifyTestElement(TestElement c)
GUI components are responsible for populating TestElements they create with the data currently held in the GUI components.
void
stateChanged(ChangeEvent e)
Invoked when the target of the listener has changed its state.
String
toString()

Methods inherited from class org.apache.jmeter.visualizers.gui.AbstractVisualizer

clearGui, configure, configureTestElement, createTestElement, getErrorLoggingCheckbox, getFile, getFilePanel, getModel, isStats, makeTitlePanel, modifyTestElement, setFile, setModel, stateChanged

Methods inherited from class org.apache.jmeter.visualizers.gui.AbstractListenerGui

createPopupMenu, getMenuCategories

Methods inherited from class org.apache.jmeter.gui.AbstractJMeterGuiComponent

clearGui, configure, configureTestElement, createTitleLabel, getComment, getDocAnchor, getName, getNamePanel, getNode, getPrintableComponent, getStaticLabel, isEnabled, makeBorder, makeScrollPane, makeScrollPane, makeTitlePanel, setComment, setEnabled, setName, setNode

Constructor Details

MailerVisualizer

public MailerVisualizer()
Constructs the MailerVisualizer and initializes its GUI.

Method Details

actionPerformed

public void actionPerformed(ActionEvent e)
Reacts on an ActionEvent (like pressing a button).
Parameters:
e - The ActionEvent with information about the event and its source.

add

public void add(SampleResult res)
This method is called by sampling thread to inform the visualizer about the arrival of a new sample.
Specified by:
add in interface Visualizer

clearData

public void clearData()
Clears any stored sampling-informations.
Specified by:
clearData in interface Clearable

configure

public void configure(TestElement el)
Restores MailerVisualizer.
Specified by:
configure in interface JMeterGUIComponent
Overrides:
configure in interface AbstractVisualizer

createTestElement

public TestElement createTestElement()
Makes MailerVisualizer storable.
Specified by:
createTestElement in interface JMeterGUIComponent
Overrides:
createTestElement in interface AbstractVisualizer

getAttributesTitle

public String getAttributesTitle()
Returns a String for the title of the attributes-panel as set up in the properties-file using the lookup-constant "mailer_attributes_panel".
Returns:
The title of the component.

getControlPanel

public JPanel getControlPanel()

getLabelResource

public String getLabelResource()
Get the component's resource name, which getStaticLabel uses to derive the component's label in the local language. The resource name is fixed, and does not vary with the selected language. Normally this method should be overriden in preference to overriding getStaticLabel(). However where the resource name is not available or required, getStaticLabel() may be overridden instead.
Specified by:
getLabelResource in interface JMeterGUIComponent
Returns:
the resource name

modifyTestElement

public void modifyTestElement(TestElement c)
GUI components are responsible for populating TestElements they create with the data currently held in the GUI components. This method should overwrite whatever data is currently in the TestElement as it is called after a user has filled out the form elements in the gui with new information.
Specified by:
modifyTestElement in interface JMeterGUIComponent
Overrides:
modifyTestElement in interface AbstractVisualizer
Parameters:

stateChanged

public void stateChanged(ChangeEvent e)
Invoked when the target of the listener has changed its state. This implementation assumes that the target is the FilePanel, and will update the result collector for the new filename.
Overrides:
stateChanged in interface AbstractVisualizer
Parameters:
e - the event that has occurred

toString

public String toString()

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