Novell exteNd
Director 5.2 API

com.sssw.fw.event.api
Interface EbiMailStateChangeListener

All Superinterfaces:
EbiEventListener, EbiStateChangeListener, EventListener

public interface EbiMailStateChangeListener
extends EbiStateChangeListener

Listens on state change events and notifies interested parties of events via email.For example:

 EbiMailStateChangeListener listener = com.sssw.fw.event.factory.EboFactory. getMailStateChangeListener(); 
 listener.setSubject("Attention, customer: system updates ...");
 listener.setFrom("System");
 listener.setHost("acme.mail.com");
 listener.setMsgText("Dear customer, The following is a notification of ...");
 ArrayList customers = getCustomerList();
 Address[] to = new Address[customers.size()];
 for (int ii = 0; ii < customers.size(); ii++)
 {
    String customer = (String)customers.get(ii);
    to[ii] = new InternetAddress(customer);
 }
 listener.setTo(to);
 EbiStateChangeProducer producer = com.sssw.fw.event.factory.getStateChangeProducer();
 producer.addStateChangeListener(listener);
 


Method Summary
 Address[] getBCC()
          Gets the list of recipients (the "Bcc" header value).
 Address[] getCC()
          Gets the list of recipients (the "Cc" header value).
 String getFrom()
          Gets the "From" header value.
 String getHost()
          Gets the server name or IP address of the mail host
 String getMsgText()
          Gets the message body (the text to precede a verbose description of the event that the notification is sent about).
 Address[] getReplyTo()
          Gets the "Reply-To" header value.
 String getSubject()
          Gets the subject of the message
 Address[] getTo()
          Gets the list of recipients (the "To" header value).
 void setBCC(Address[] bcc)
          Sets the list of recipients (the "Bcc" header value).
 void setCC(Address[] cc)
          Sets the list of recipients (the "Cc" header value).
 void setFrom(String from)
          Sets the "From" header value.
 void setHost(String host)
          Sets the server name or IP address of the mail host
 void setMsgText(String msgText)
          Sets the message body (the text to precede a verbose description of the event that the notification is sent about).
 void setReplyTo(Address[] replyTo)
          Sets the "Reply-To" header value.
 void setSubject(String subject)
          Sets the subject of the message
 void setTo(Address[] to)
          Sets the list of recipients (the "To" header value)
 
Methods implemented from interface com.sssw.fw.event.api.EbiStateChangeListener
stateChanged
 
Methods implemented from interface com.sssw.fw.event.api.EbiEventListener
getListenerDescription, getLog, setListenerDescription, setLog
 

Method Detail

getFrom

public String getFrom()
Gets the "From" header value.
Returns:
the "From" header value

setFrom

public void setFrom(String from)
Sets the "From" header value.
Parameters:
from - the "From" header value

getTo

public Address[] getTo()
Gets the list of recipients (the "To" header value).
Returns:
the list of "To" recipients

setTo

public void setTo(Address[] to)
Sets the list of recipients (the "To" header value)
Parameters:
to - the list of "To" recipients

getCC

public Address[] getCC()
Gets the list of recipients (the "Cc" header value).
Returns:
the list of "Cc" recipients

setCC

public void setCC(Address[] cc)
Sets the list of recipients (the "Cc" header value).
Parameters:
cc - the list of "Cc" recipients

getBCC

public Address[] getBCC()
Gets the list of recipients (the "Bcc" header value).
Returns:
the list of "Bcc" recipients

setBCC

public void setBCC(Address[] bcc)
Sets the list of recipients (the "Bcc" header value).
Parameters:
bcc - the list of "Bcc" recipients

getHost

public String getHost()
Gets the server name or IP address of the mail host
Returns:
the server name or IP address of the mail host

setHost

public void setHost(String host)
Sets the server name or IP address of the mail host
Parameters:
host - the server name or IP address of the mail host

getSubject

public String getSubject()
Gets the subject of the message
Returns:
the subject of the message

setSubject

public void setSubject(String subject)
Sets the subject of the message
Parameters:
subject - the subject of the message

getMsgText

public String getMsgText()
Gets the message body (the text to precede a verbose description of the event that the notification is sent about).
Returns:
the message body

setMsgText

public void setMsgText(String msgText)
Sets the message body (the text to precede a verbose description of the event that the notification is sent about).
Parameters:
msgText - the message body

getReplyTo

public Address[] getReplyTo()
Gets the "Reply-To" header value.
Returns:
the "Reply-To"

setReplyTo

public void setReplyTo(Address[] replyTo)
Sets the "Reply-To" header value.
Parameters:
replyTo - the "Reply-To"

Novell exteNd
Director 5.2 API