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 TypeMethodDescriptionvoidAddClientStation(com.nt.udc.admin.TrapHost m) Add a station that is to recive trapsvoidAddClientStationList(com.nt.udc.admin.TrapHostList v) voidremove all trap clientsvoidDeleteClientStation(com.nt.udc.admin.TrapHost m) delete a station that is to recive trapsvoiddispose()I found I needed this method to clean-up between test cases in JUnit.static SnmpTrapSenderImplget_instance(LoggerIfc logger) As logical as this was - the singleton did not work ...com.nt.udc.admin.TrapHostListReturns a vector of MgtStation objects which represents all trap ClientsbooleanUse this method to see if this snmp interface has been fully initialized.booleanIs the host table loadedvoidSendTrap(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.voidsetConfigDir(String absPath) voidsetHomeDir(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:
SendTrapin interfaceSnmpTrapSenderIfc- Throws:
TrapException
-
AddClientStation
Add a station that is to recive traps- Specified by:
AddClientStationin interfaceSnmpTrapSenderIfc- Throws:
TrapException
-
AddClientStationList
- Specified by:
AddClientStationListin interfaceSnmpTrapSenderIfc- Throws:
TrapException
-
DeleteClientStation
delete a station that is to recive traps- Specified by:
DeleteClientStationin interfaceSnmpTrapSenderIfc- Throws:
TrapException
-
DeleteAllClientStations
remove all trap clients- Specified by:
DeleteAllClientStationsin interfaceSnmpTrapSenderIfc- Throws:
TrapException
-
getStationList
Returns a vector of MgtStation objects which represents all trap Clients- Specified by:
getStationListin interfaceSnmpTrapSenderIfc- Throws:
TrapException
-
isTrapListAvailable
Description copied from interface:SnmpTrapSenderIfcIs the host table loaded- Specified by:
isTrapListAvailablein interfaceSnmpTrapSenderIfc- Throws:
TrapException
-
getConfigDir
- Specified by:
getConfigDirin interfaceSnmpTrapSenderIfc- Throws:
TrapException
-
setConfigDir
- Specified by:
setConfigDirin interfaceSnmpTrapSenderIfc- Throws:
TrapException
-
setHomeDir
- Specified by:
setHomeDirin 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:
isInitializedin interfaceSnmpTrapSenderIfc
-
dispose
public void dispose()I found I needed this method to clean-up between test cases in JUnit.
-