Class SnmpTrapNorthbounderManager
- java.lang.Object
-
- org.opennms.netmgt.alarmd.northbounder.snmptrap.SnmpTrapNorthbounderManager
-
- All Implemented Interfaces:
Northbounder
,org.springframework.beans.factory.DisposableBean
,org.springframework.beans.factory.InitializingBean
public class SnmpTrapNorthbounderManager extends java.lang.Object implements org.springframework.beans.factory.InitializingBean, Northbounder, org.springframework.beans.factory.DisposableBean
The Class SnmpTrapNorthbounderManager.- Author:
- Alejandro Galue
-
-
Constructor Summary
Constructors Constructor Description SnmpTrapNorthbounderManager()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
afterPropertiesSet()
After properties set.void
destroy()
Destroy.java.lang.String
getName()
Gets the name.boolean
isReady()
Used to determine if the northbounder is ready to accept alarms.void
onAlarm(NorthboundAlarm alarm)
On alarm.void
reloadConfig()
Reloads the configuration.void
start()
Start.void
stop()
Stop.
-
-
-
Method Detail
-
afterPropertiesSet
public void afterPropertiesSet() throws java.lang.Exception
After properties set.- Specified by:
afterPropertiesSet
in interfaceorg.springframework.beans.factory.InitializingBean
- Throws:
java.lang.Exception
- the exception
-
destroy
public void destroy() throws java.lang.Exception
Destroy.- Specified by:
destroy
in interfaceorg.springframework.beans.factory.DisposableBean
- Throws:
java.lang.Exception
- the exception
-
start
public void start() throws NorthbounderException
Start.- Specified by:
start
in interfaceNorthbounder
- Throws:
NorthbounderException
- the northbounder exception
-
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.- Specified by:
isReady
in interfaceNorthbounder
- Returns:
true
if the northbounder is ready to accept alarms,false
otherwise.
-
onAlarm
public void onAlarm(NorthboundAlarm alarm) throws NorthbounderException
On alarm.- Specified by:
onAlarm
in interfaceNorthbounder
- Parameters:
alarm
- the alarm- Throws:
NorthbounderException
- the northbounder exception
-
stop
public void stop() throws NorthbounderException
Stop.- Specified by:
stop
in interfaceNorthbounder
- Throws:
NorthbounderException
- the northbounder exception
-
getName
public java.lang.String getName()
Gets the name.- Specified by:
getName
in interfaceNorthbounder
- Returns:
- the name
-
reloadConfig
public void reloadConfig() throws NorthbounderException
Reloads the configuration.- Specified by:
reloadConfig
in interfaceNorthbounder
- Throws:
NorthbounderException
-
-