org.rhq.enterprise.server.core
Interface EmailManagerLocal

All Known Implementing Classes:
EmailManagerBean

public interface EmailManagerLocal

Local interface that allows clients to send SMTP email messages.

Author:
John Mazzitelli

Method Summary
 Map<String,String> getAlertEmailMessage(String resourceHierarchy, String resourceName, String alertName, String priority, String timestamp, String conditionLogs, String alertUrl)
          This returns an email message based on the alert email template with its replacement tokens replaced with the given strings.
 Collection<String> sendEmail(Collection<String> toAddresses, String messageSubject, String messageBody)
          Send email to the addressses passed in toAddresses with the passed subject and body.
 

Method Detail

sendEmail

Collection<String> sendEmail(Collection<String> toAddresses,
                             String messageSubject,
                             String messageBody)
Send email to the addressses passed in toAddresses with the passed subject and body. Invalid emails will be reported back. This can only catch sender errors up to the first smtp gateway.

Parameters:
toAddresses - list of email addresses to send to
messageSubject - subject of the email sent
messageBody - body of the email to be sent
Returns:
list of email receivers for which initial delivery failed.

getAlertEmailMessage

Map<String,String> getAlertEmailMessage(String resourceHierarchy,
                                        String resourceName,
                                        String alertName,
                                        String priority,
                                        String timestamp,
                                        String conditionLogs,
                                        String alertUrl)
This returns an email message based on the alert email template with its replacement tokens replaced with the given strings. The returns Map has size 1 - the key is the subject and the value is the body of the message.

Parameters:
resourceHierarchy - ascii tree structure containing the names of resources up to the corresponding platform
resourceName - name of the resource that triggered the alert
alertName - name of the alert that was triggered
priority - the priority of the alert
timestamp - the date/time when the alert was triggered
conditionLogs - that conditionLogs that were met that caused the alert to trigger
alertUrl - URL to the GUI page of the alert that was triggered
Returns:
alert email message (key=subject, value=body)


Copyright © 2008-2012 Red Hat, Inc.. All Rights Reserved.