org.backsource.alert.sender
Class MailSender
java.lang.Object
org.backsource.alert.sender.SenderBase
org.backsource.alert.sender.MailSender
- All Implemented Interfaces:
- Sender
- public class MailSender
- extends SenderBase
Send arror and warnings by mail.
The sender uses the normal JavaMail properties for its sending, so any
standard properties given i properties will reach the mailer. It also uses the properties PropertyConstants.MAIL_ERROR_TO and PropertyConstants.MAIL_WARNING_TO to send errors and warnings. Both are space separated lists of mail adresses.
- Version:
- $Revision: 1.1.1.1 $
- Author:
- Peter Antman
| Fields inherited from class org.backsource.alert.sender.SenderBase |
prop |
|
Method Summary |
static void |
main(java.lang.String[] args)
|
void |
sendErrors(java.util.List errors,
java.util.List warnings)
Send the errors and warnings given. |
void |
sendWarnings(java.util.List warnings)
Send the warnings given. |
protected void |
setUp()
Callback method when Sender is initializes, sub classes should do its setup in this method. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MailSender
public MailSender()
throws java.lang.Exception
setUp
protected void setUp()
throws java.lang.Exception
- Description copied from class:
SenderBase
- Callback method when Sender is initializes, sub classes should do its setup in this method.
- Specified by:
setUp in class SenderBase
- Throws:
java.lang.Exception
sendErrors
public void sendErrors(java.util.List errors,
java.util.List warnings)
- Description copied from interface:
Sender
- Send the errors and warnings given.
- Specified by:
sendErrors in interface Sender- Specified by:
sendErrors in class SenderBase
sendWarnings
public void sendWarnings(java.util.List warnings)
- Description copied from interface:
Sender
- Send the warnings given.
It is up to the sender to decide, based on configuration or statically
if it should really send warnings.
- Specified by:
sendWarnings in interface Sender- Specified by:
sendWarnings in class SenderBase
main
public static void main(java.lang.String[] args)
Copyright © 2002-2004 Backsource. All Rights Reserved.