org.edg.security.voms.notification
Class EmailNotification

java.lang.Object
  |
  +--org.edg.security.voms.notification.Notification
        |
        +--org.edg.security.voms.notification.EmailNotification
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
AllowNotification, ConfirmedNotification, ConfirmNotification, DecisionNotification, DenyNotification, EmailNotificationTest.TestNotification

public class EmailNotification
extends Notification

Base class for any email based notification method. This class implements some convenience methods for email sending.

Version:
$Name: v0_7_0 $
Author:
Akos Frohner
See Also:
Serialized Form

Field Summary
private static org.apache.log4j.Logger log
           
protected  java.lang.String messageID
           
protected static javax.mail.Session session
           
 
Fields inherited from class org.edg.security.voms.notification.Notification
message, recipients, sender, sent, subject
 
Constructor Summary
EmailNotification()
           
 
Method Summary
 java.lang.String getMessageID()
          The message id of the SMTP message, which was generated, when the message was sent.
 boolean send()
          Once the notification is created this method tries to send the message.
protected static javax.mail.Session theSession()
           
 
Methods inherited from class org.edg.security.voms.notification.Notification
fillMap, fillMap, getMessage, getRecipients, getSender, getSubject, isPending, isSent, newMessage, setRecipientsToAdmins, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

log

private static org.apache.log4j.Logger log

session

protected static javax.mail.Session session

messageID

protected java.lang.String messageID
Constructor Detail

EmailNotification

public EmailNotification()
Method Detail

theSession

protected static javax.mail.Session theSession()

getMessageID

public java.lang.String getMessageID()
The message id of the SMTP message, which was generated, when the message was sent. null is returned, if the message was not sent so far.


send

public boolean send()
Description copied from class: Notification
Once the notification is created this method tries to send the message. The success can be also checked via the isSent() method.

Overrides:
send in class Notification
Returns:
success of the operation