Package com.nt.udc.util
Class SnmpTrapSenderImpl
java.lang.Object
com.nt.udc.util.SnmpTrapSenderImpl
- All Implemented Interfaces:
SnmpTrapSenderIfc
,Serializable
- See Also:
-
Field Summary
Fields inherited from interface com.nt.udc.util.SnmpTrapSenderIfc
MIB_CLEAR, MIB_CRITICAL, MIB_MAJOR, MIB_MINOR, MIB_WARNING
-
Method Summary
Modifier and TypeMethodDescriptionvoid
AddClientStation
(com.nt.udc.admin.TrapHost m) Add a station that is to recive trapsvoid
AddClientStationList
(com.nt.udc.admin.TrapHostList v) void
remove all trap clientsvoid
DeleteClientStation
(com.nt.udc.admin.TrapHost m) delete a station that is to recive trapsvoid
dispose()
I found I needed this method to clean-up between test cases in JUnit.static SnmpTrapSenderImpl
get_instance
(LoggerIfc logger) As logical as this was - the singleton did not work ...com.nt.udc.admin.TrapHostList
Returns a vector of MgtStation objects which represents all trap Clientsboolean
Use this method to see if this snmp interface has been fully initialized.boolean
Is the host table loadedvoid
SendTrap
(int trapSeverity, String category, String alarmText, String additionalText, String componentName, String componentType, int alarmId, String alarmTime) If all the fault information is modeled in the logger, we still have to communicate the information with the outside world via the SNMP interface.void
setConfigDir
(String absPath) void
setHomeDir
(String home)
-
Method Details
-
get_instance
As logical as this was - the singleton did not work ... The nodes kept garbage-collecting the singleton when they were shutdown.- Returns:
- The unique instance of this class.
-
SendTrap
public void SendTrap(int trapSeverity, String category, String alarmText, String additionalText, String componentName, String componentType, int alarmId, String alarmTime) throws TrapException If all the fault information is modeled in the logger, we still have to communicate the information with the outside world via the SNMP interface. "udcFaultComponentName", "udcFaultComponentType", "udcFaultHostName", "udcFaultSeverity", "udcFaultCategory", "udcFaultSpecificText", "udcFaultAdditionalText", "udcFaultTime", "udcFaultNotificationId"- Specified by:
SendTrap
in interfaceSnmpTrapSenderIfc
- Throws:
TrapException
-
AddClientStation
Add a station that is to recive traps- Specified by:
AddClientStation
in interfaceSnmpTrapSenderIfc
- Throws:
TrapException
-
AddClientStationList
- Specified by:
AddClientStationList
in interfaceSnmpTrapSenderIfc
- Throws:
TrapException
-
DeleteClientStation
delete a station that is to recive traps- Specified by:
DeleteClientStation
in interfaceSnmpTrapSenderIfc
- Throws:
TrapException
-
DeleteAllClientStations
remove all trap clients- Specified by:
DeleteAllClientStations
in interfaceSnmpTrapSenderIfc
- Throws:
TrapException
-
getStationList
Returns a vector of MgtStation objects which represents all trap Clients- Specified by:
getStationList
in interfaceSnmpTrapSenderIfc
- Throws:
TrapException
-
isTrapListAvailable
Description copied from interface:SnmpTrapSenderIfc
Is the host table loaded- Specified by:
isTrapListAvailable
in interfaceSnmpTrapSenderIfc
- Throws:
TrapException
-
getConfigDir
- Specified by:
getConfigDir
in interfaceSnmpTrapSenderIfc
- Throws:
TrapException
-
setConfigDir
- Specified by:
setConfigDir
in interfaceSnmpTrapSenderIfc
- Throws:
TrapException
-
setHomeDir
- Specified by:
setHomeDir
in interfaceSnmpTrapSenderIfc
- Throws:
TrapException
-
isInitialized
public boolean isInitialized()Use this method to see if this snmp interface has been fully initialized. If mibOps is non-null, then we should be good to send traps.- Specified by:
isInitialized
in interfaceSnmpTrapSenderIfc
-
dispose
public void dispose()I found I needed this method to clean-up between test cases in JUnit.
-