Class AlarmNorthbounder
- java.lang.Object
-
- org.opennms.netmgt.alarmd.api.support.AbstractNorthbounder
-
- org.opennms.features.amqp.alarmnorthbounder.AlarmNorthbounder
-
- All Implemented Interfaces:
java.lang.Runnable
,Northbounder
,StatusFactory<NorthboundAlarm>
public class AlarmNorthbounder extends AbstractNorthbounder
-
-
Constructor Summary
Constructors Constructor Description AlarmNorthbounder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
accepts(NorthboundAlarm alarm)
Accepts.void
forwardAlarms(java.util.List<NorthboundAlarm> alarms)
Forward alarms.DefaultAlarmForwarder
getAlarmForwarder()
boolean
isReady()
Used to determine if the northbounder is ready to accept alarms.void
setAlarmForwarder(DefaultAlarmForwarder alarmForwarder)
-
Methods inherited from class org.opennms.netmgt.alarmd.api.support.AbstractNorthbounder
createMapping, createSyncLostMessage, discard, getName, onAlarm, onPostStart, onPreStart, onStop, preserve, reloadConfig, run, setMaxBatchSize, setMaxPreservedAlarms, setNaglesDelay, setRetryInterval, start, stop
-
-
-
-
Method Detail
-
accepts
protected boolean accepts(NorthboundAlarm alarm)
Description copied from class:AbstractNorthbounder
Accepts.- Specified by:
accepts
in classAbstractNorthbounder
- Parameters:
alarm
- the alarm- Returns:
- true, if successful
-
forwardAlarms
public void forwardAlarms(java.util.List<NorthboundAlarm> alarms) throws NorthbounderException
Description copied from class:AbstractNorthbounder
Forward alarms.- Specified by:
forwardAlarms
in classAbstractNorthbounder
- Parameters:
alarms
- the alarms- Throws:
NorthbounderException
- the northbounder exception
-
getAlarmForwarder
public DefaultAlarmForwarder getAlarmForwarder()
-
setAlarmForwarder
public void setAlarmForwarder(DefaultAlarmForwarder alarmForwarder)
-
isReady
public boolean isReady()
Description copied from interface:Northbounder
Used to determine if the northbounder is ready to accept alarms. If no northbounders are ready, the caller can save resources by not creating and initializing theNorthboundAlarm
s. This method is called once after northbounder is registered and started. If the status were to change sometime after, the northbounder must re-register itself.- Returns:
true
if the northbounder is ready to accept alarms,false
otherwise.
-
-