public class MailerModel extends AbstractTestElement implements Serializable
COMMENTS, ENABLED, GUI_CLASS, NAME, TEST_CLASS| Constructor and Description |
|---|
MailerModel()
Constructs a MailerModel.
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(SampleResult sample)
Adds a SampleResult for display in the Visualizer.
|
void |
add(SampleResult sample,
boolean sendMails)
Adds a SampleResult.
|
void |
addChangeListener(ChangeListener list) |
void |
clear()
Resets the state of this object to its default.
|
Object |
clone() |
Vector<String> |
getAddressVector()
Gets a Vector of String-objects.
|
long |
getFailureCount() |
long |
getFailureLimit() |
String |
getFailureSubject() |
String |
getFromAddress() |
String |
getSmtpHost() |
long |
getSuccessCount() |
long |
getSuccessLimit() |
String |
getSuccessSubject() |
String |
getToAddress() |
void |
notifyChangeListeners() |
void |
sendMail(String from,
Vector<String> vEmails,
String subject,
String attText,
String smtpHost)
Sends a mail with the given parameters using SMTP.
|
void |
sendTestMail() |
void |
setFailureLimit(String limit) |
void |
setFailureSubject(String str) |
void |
setFromAddress(String str) |
void |
setSmtpHost(String str) |
void |
setSuccessLimit(String limit) |
void |
setSuccessSubject(String str) |
void |
setToAddress(String str) |
String |
toString()
Returns a String-representation of this object.
|
addProperty, addTestElement, canRemove, clearTemporary, clearTestElementChildren, emptyTemporary, equals, getComment, getName, getProperty, getPropertyAsBoolean, getPropertyAsBoolean, getPropertyAsDouble, getPropertyAsFloat, getPropertyAsInt, getPropertyAsInt, getPropertyAsLong, getPropertyAsLong, getPropertyAsString, getPropertyAsString, getThreadContext, getThreadName, hashCode, isEnabled, isRunningVersion, isTemporary, logProperties, mergeIn, propertyIterator, recoverRunningVersion, removeProperty, setComment, setName, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setRunningVersion, setTemporary, setThreadContext, setThreadName, traverse, traverseCollection, traverseMap, traversePropertypublic void addChangeListener(ChangeListener list)
public Object clone()
clone in interface TestElementclone in class AbstractTestElementpublic void notifyChangeListeners()
public Vector<String> getAddressVector()
setToAddress(str). The addresses
must be seperated by commas. Only String-objects containing a "@" are
added to the returned Vector.public void add(SampleResult sample)
sample - the SampleResult encapsulating informations about the last
sample.public void add(SampleResult sample, boolean sendMails)
successCount and
failureCount.sample - the SampleResult encapsulating information about the last
sample.sendMails - whether or not to send e-mailspublic void clear()
clear in interface TestElementclear in class AbstractTestElementpublic String toString()
public void sendMail(String from, Vector<String> vEmails, String subject, String attText, String smtpHost) throws javax.mail.internet.AddressException, javax.mail.MessagingException
from - the sender of the mail as shown in the mail-client.vEmails - all receivers of the mail. The receivers are seperated by
commas.subject - the subject of the mail.attText - the message-body.smtpHost - the smtp-server used to send the mail.javax.mail.internet.AddressExceptionjavax.mail.MessagingExceptionpublic void sendTestMail()
throws javax.mail.internet.AddressException,
javax.mail.MessagingException
javax.mail.internet.AddressExceptionjavax.mail.MessagingExceptionpublic void setToAddress(String str)
public void setFromAddress(String str)
public void setSmtpHost(String str)
public void setFailureSubject(String str)
public void setSuccessSubject(String str)
public void setSuccessLimit(String limit)
public void setFailureLimit(String limit)
public String getToAddress()
public String getFromAddress()
public String getSmtpHost()
public String getFailureSubject()
public String getSuccessSubject()
public long getSuccessLimit()
public long getSuccessCount()
public long getFailureLimit()
public long getFailureCount()
Copyright © 1998-2012 Apache Software Foundation. All Rights Reserved.