Class EmailDestination
- java.lang.Object
-
- org.opennms.netmgt.alarmd.northbounder.email.EmailDestination
-
- All Implemented Interfaces:
java.io.Serializable
,Destination
public class EmailDestination extends java.lang.Object implements Destination
Configuration for the various Email hosts to receive alarms via Email.- Author:
- Alejandro Galue
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description EmailDestination()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
accepts(NorthboundAlarm alarm)
Accepts.java.util.List<EmailFilter>
getFilters()
Gets the filters.java.lang.String
getName()
Gets the destination name.boolean
isFirstOccurrenceOnly()
Checks if is first occurrence only.void
setFilters(java.util.List<EmailFilter> filters)
Sets the filters.void
setName(java.lang.String name)
Sets the name.
-
-
-
Method Detail
-
isFirstOccurrenceOnly
public boolean isFirstOccurrenceOnly()
Description copied from interface:Destination
Checks if is first occurrence only.- Specified by:
isFirstOccurrenceOnly
in interfaceDestination
- Returns:
- true, if is first occurrence only
-
getName
public java.lang.String getName()
Description copied from interface:Destination
Gets the destination name.- Specified by:
getName
in interfaceDestination
- Returns:
- the destination name
-
setName
public void setName(java.lang.String name)
Sets the name.- Parameters:
name
- the new name
-
getFilters
public java.util.List<EmailFilter> getFilters()
Gets the filters.- Returns:
- the filters
-
setFilters
public void setFilters(java.util.List<EmailFilter> filters)
Sets the filters.- Parameters:
filters
- the new filters
-
accepts
public boolean accepts(NorthboundAlarm alarm)
Accepts.If the destination doesn't have filter, the method will return true.
If the method has filters, they will be evaluated. If no filters are satisfied, the method will return false. Otherwise, the method will return true as soon as one filter is satisfied.
- Parameters:
alarm
- the alarm- Returns:
- true, if successful
-
-