|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.rhq.enterprise.server.plugin.pc.alert.AlertSender<T>
public abstract class AlertSender<T extends ServerPluginComponent>
Abstract base class for all Alert senders. In order to implement your AlertSender, you need to at least overwrite #send(). When the AlertSenderManager constructs this object, it will inject the preferences for your specific alert sender type. For each Alert a new instance of your implementation will be called and destroyed afterwards.
| Field Summary | |
|---|---|
protected org.rhq.core.domain.configuration.Configuration |
alertParameters
Configuration from the per alert definition parameters |
protected org.rhq.core.domain.configuration.Configuration |
extraParameters
Configuration from the per alert definition parameters |
protected T |
pluginComponent
Global component holding persistent resources |
protected org.rhq.core.domain.configuration.Configuration |
preferences
Configuration from the global per plugin type preferences |
protected ServerPluginEnvironment |
serverPluginEnvironment
Environement of the plugin to e.g. |
| Constructor Summary | |
|---|---|
AlertSender()
|
|
| Method Summary | ||
|---|---|---|
static String |
fence(List<?> elements)
Takes the list of elements e1, e2, e3 and fences them with '|' delimiters such that the result looks like "|e1|e2|e3|" |
|
String |
previewConfiguration()
Allow users to see a preview of the stored configuration data without having to edit it. |
|
abstract org.rhq.core.domain.alert.notification.SenderResult |
send(org.rhq.core.domain.alert.Alert alert)
This method is called to actually send an alert notification. |
|
static
|
unfence(String fencedData,
Class<T> type)
Presumes the data is in the format "|a|b|c|d|e|" where '|' delimits all elements as well as wraps the entire expression. |
|
static
|
unfence(String fencedData,
Class<T> type,
String delimiter)
|
|
AlertSenderValidationResults |
validateAndFinalizeConfiguration(org.rhq.core.domain.auth.Subject subject)
Validates the alert and extra parameters. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected org.rhq.core.domain.configuration.Configuration preferences
protected org.rhq.core.domain.configuration.Configuration alertParameters
protected org.rhq.core.domain.configuration.Configuration extraParameters
protected T extends ServerPluginComponent pluginComponent
protected ServerPluginEnvironment serverPluginEnvironment
| Constructor Detail |
|---|
public AlertSender()
| Method Detail |
|---|
public abstract org.rhq.core.domain.alert.notification.SenderResult send(org.rhq.core.domain.alert.Alert alert)
alert - the Alert to operate on
public String previewConfiguration()
public AlertSenderValidationResults validateAndFinalizeConfiguration(org.rhq.core.domain.auth.Subject subject)
error messages set.
The implementation is free to change (add/update/delete) properties in either of the configurations (i.e. finalize them). This is to support scenarios where the user inputs values that need to be further processed in an alert sender specific way before they get stored into the database.
The default implementation makes no changes to the configurations.
subject - the subject requesting the changes in the configuration
public static <T> List<T> unfence(String fencedData,
Class<T> type)
public static <T> List<T> unfence(String fencedData,
Class<T> type,
String delimiter)
public static String fence(List<?> elements)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||