1 18 19 package org.apache.jmeter.reporters; 20 21 import java.io.Serializable ; 22 23 import org.apache.jmeter.samplers.SampleEvent; 24 import org.apache.jmeter.testelement.property.TestElementProperty; 25 28 32 public class MailerResultCollector 33 extends ResultCollector 34 implements Serializable 35 { 36 public static final String MAILER_MODEL = 38 "MailerResultCollector.mailer_model"; 39 40 41 public MailerResultCollector() 42 { 43 super(); 44 setProperty(new TestElementProperty(MAILER_MODEL, new MailerModel())); 45 } 46 47 public void clear() 48 { 49 super.clear(); 50 setProperty(new TestElementProperty(MAILER_MODEL,new MailerModel())); 51 } 52 53 54 57 public void sampleOccurred(SampleEvent e) 58 { 59 super.sampleOccurred(e); 61 getMailerModel().add(e.getResult()); 62 } 63 64 public MailerModel getMailerModel() 65 { 66 return (MailerModel)getProperty(MAILER_MODEL).getObjectValue(); 67 } 68 } 69 | Popular Tags |