Class HttpNorthbounder
- java.lang.Object
-
- org.opennms.netmgt.alarmd.api.support.AbstractNorthbounder
-
- org.opennms.netmgt.alarmd.northbounder.http.HttpNorthbounder
-
- All Implemented Interfaces:
Runnable
,Northbounder
,StatusFactory<NorthboundAlarm>
public class HttpNorthbounder extends AbstractNorthbounder
Forwards north bound alarms via HTTP.FIXME: Needs lots of work still :(
- Author:
- David Hustace
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
HttpNorthbounder()
Instantiates a new http northbounder.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
accepts(NorthboundAlarm alarm)
Accepts.void
forwardAlarms(List<NorthboundAlarm> alarms)
Forward alarms.HttpNorthbounderConfig
getConfig()
Gets the configuration.boolean
isReady()
Used to determine if the northbounder is ready to accept alarms.void
setConfig(HttpNorthbounderConfig config)
Sets the configuration.-
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
public boolean accepts(NorthboundAlarm alarm)
Description copied from class:AbstractNorthbounder
Accepts.- Specified by:
accepts
in classAbstractNorthbounder
- Parameters:
alarm
- the alarm- Returns:
- true, if successful
-
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.
-
forwardAlarms
public void forwardAlarms(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
-
getConfig
public HttpNorthbounderConfig getConfig()
Gets the configuration.- Returns:
- the configuration
-
setConfig
public void setConfig(HttpNorthbounderConfig config)
Sets the configuration.- Parameters:
config
- the new configuration
-
-