|
Novell exteNd Director 5.2 API |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
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 |
public String getFrom()
public void setFrom(String from)
from
- the "From" header valuepublic Address[] getTo()
public void setTo(Address[] to)
to
- the list of "To" recipientspublic Address[] getCC()
public void setCC(Address[] cc)
cc
- the list of "Cc" recipientspublic Address[] getBCC()
public void setBCC(Address[] bcc)
bcc
- the list of "Bcc" recipientspublic String getHost()
public void setHost(String host)
host
- the server name or IP address of the mail hostpublic String getSubject()
public void setSubject(String subject)
subject
- the subject of the messagepublic String getMsgText()
public void setMsgText(String msgText)
msgText
- the message bodypublic Address[] getReplyTo()
public void setReplyTo(Address[] replyTo)
replyTo
- the "Reply-To"
|
Novell exteNd Director 5.2 API |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |