public class BSFNorthbounder extends AbstractNorthbounder implements org.springframework.beans.factory.InitializingBean
Modifier and Type | Field and Description |
---|---|
protected static String |
NBI_NAME
The Constant NBI_NAME.
|
Constructor and Description |
---|
BSFNorthbounder(BSFNorthbounderConfigDao configDao,
String engineName)
Instantiates a new BSF northbounder.
|
Modifier and Type | Method and Description |
---|---|
boolean |
accepts(NorthboundAlarm alarm)
The abstraction makes a call here to determine if the alarm should be placed on the queue of alarms to be sent northerly.
|
void |
afterPropertiesSet() |
void |
forwardAlarms(List<NorthboundAlarm> alarms)
Each implementation of the AbstractNorthbounder has a nice queue (Nagle's algorithmic) and the worker thread that processes the queue
calls this method to send alarms to the northern NMS.
|
protected BSFNorthbounderConfig |
getConfig()
Gets the configuration.
|
boolean |
isReady()
Used to determine if the northbounder is ready to accept alarms.
|
protected void |
onStop()
Override this to perform actions when stopping.
|
createMapping, createSyncLostMessage, discard, getName, onAlarm, onPostStart, onPreStart, preserve, reloadConfig, run, setMaxBatchSize, setMaxPreservedAlarms, setNaglesDelay, setRetryInterval, start, stop
protected static final String NBI_NAME
public BSFNorthbounder(BSFNorthbounderConfigDao configDao, String engineName)
configDao
- the configuration DAOengineName
- the engine namepublic void afterPropertiesSet() throws Exception
afterPropertiesSet
in interface org.springframework.beans.factory.InitializingBean
Exception
protected void onStop()
AbstractNorthbounder
onStop
in class AbstractNorthbounder
public boolean accepts(NorthboundAlarm alarm)
accepts
in class AbstractNorthbounder
alarm
- the alarmpublic boolean isReady()
Northbounder
NorthboundAlarm
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.isReady
in interface Northbounder
true
if the northbounder is ready to accept alarms, false
otherwise.public void forwardAlarms(List<NorthboundAlarm> alarms) throws NorthbounderException
forwardAlarms
in class AbstractNorthbounder
alarms
- the alarmsNorthbounderException
- the northbounder exceptionprotected BSFNorthbounderConfig getConfig()
Copyright © 2020. All rights reserved.