org.jboss.soa.esb.notification
Class NotifyEmail

java.lang.Object
  extended by org.jboss.soa.esb.notification.NotificationTarget
      extended by org.jboss.soa.esb.notification.NotifyEmail

public class NotifyEmail
extends NotificationTarget

This class will send an e-mail using the Email class

Description:

Author: Heuristica - Buenos Aires - Argentina

Version:
1.0

Field Summary
 
Fields inherited from class org.jboss.soa.esb.notification.NotificationTarget
m_oParms, PRM_NOTIF_CLASS
 
Constructor Summary
NotifyEmail(ConfigTree p_oP)
          Instantiate a NotifyEmail object using the information contained in <arg 1>
 
Method Summary
protected  void sendEmailNotification(ConfigTree messageParams)
          Send an email notification based on the supplied parameters.
 void sendNotification(Message message)
          Send an Email using Email() using p_o.toString() to fill in the message text
 
Methods inherited from class org.jboss.soa.esb.notification.NotificationTarget
fromParams
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NotifyEmail

public NotifyEmail(ConfigTree p_oP)
            throws ConfigurationException
Instantiate a NotifyEmail object using the information contained in <arg 1>

Parameters:
p_oP - ConfigTree - See attributes and structure needed for the Email() constructor - The MESSAGE attribute will be filled in at sendNotification(Serializable) time
Throws:
ConfigurationException
See Also:
sendNotification(Message)
Method Detail

sendNotification

public void sendNotification(Message message)
                      throws NotificationException
Send an Email using Email() using p_o.toString() to fill in the message text

Specified by:
sendNotification in class NotificationTarget
Parameters:
message - Object - This object's toString() method will supply contents of mail message
Throws:
NotificationException - - invoke Exception.getMessage() at runtime for this object
See Also:
ConfigTree

sendEmailNotification

protected void sendEmailNotification(ConfigTree messageParams)
                              throws javax.mail.internet.AddressException,
                                     javax.mail.MessagingException
Send an email notification based on the supplied parameters.

This method allows overriding for test purposes.

Parameters:
messageParams - Message parameters.
Throws:
javax.mail.internet.AddressException
javax.mail.MessagingException