|
HOME | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ireasoning.protocol.snmp.VarBindContainer | +--com.ireasoning.protocol.snmp.SnmpPdu | +--com.ireasoning.protocol.snmp.SnmpV2Notification
This class represents SNMPv2 and SNMPv3 Notification type object, including trap and inform requests.
SNMPv1 trap is represented by
SnmpV1Trap
class.
SnmpV1Trap
, Serialized FormField Summary | |
static SnmpOID |
AUTHENTICATION_FAILURE_TRAP_OID
SNMPv2c warmStart trap oid: authenticationFailure |
static SnmpOID |
COLD_START_TRAP_OID
SNMPv2c coldStart trap oid |
static SnmpOID |
EGPNEIGHBOR_LOSS_OID
SNMPv2c warmStart trap oid: egpNeighborLoss |
static SnmpOID |
LINK_DOWN_TRAP_OID
SNMPv2c warmStart trap oid: linkDown |
static SnmpOID |
LINK_UP_TRAP_OID
SNMPv2c warmStart trap oid: linkUp |
static SnmpOID |
SNMP_TRAP_ENTERPRISE_OID
snmpTrapEnterprise (".1.3.6.1.6.3.1.1.4.3.0") |
static SnmpOID |
SNMP_TRAP_OID
snmpTrapOID (".1.3.6.1.6.3.1.1.4.1.0") |
static SnmpOID |
SYS_UP_TIME_OID
sysUpTime oid (".1.3.6.1.2.1.1.3.0") |
static SnmpOID |
WARM_START_TRAP_OID
SNMPv2c warmStart trap oid: warmStart |
Fields inherited from interface com.ireasoning.protocol.snmp.SnmpDataType |
BITS, BITSTRING, COUNTER32, COUNTER64, END_OF_MIB_VIEW, END_OF_MIB_VIEW_OBJECT, GAUGE32, INTEGER, IPADDRESS, NO_SUCH_INSTANCE, NO_SUCH_INSTANCE_OBJECT, NO_SUCH_OBJECT, NO_SUCH_OBJECT_OBJECT, NULL, OCTETSTRING, OID, OPAQUE, PDU, SEQUENCE, SEQUENCEOF, TIMETICKS, UNSIGNED32, VARBIND |
Fields inherited from interface com.ireasoning.protocol.Msg |
ERROR_TYPE |
Constructor Summary | |
SnmpV2Notification(long sysUpTime,
SnmpOID snmpTrapOID)
Creates a SnmpV2Notification object using passed parameters |
|
SnmpV2Notification(long sysUpTime,
SnmpOID snmpTrapOID,
SnmpVarBind[] varbinds)
Creates a SnmpV2Notification object using passed parameters |
|
SnmpV2Notification(SnmpV2Notification notif)
Makes a copy of passed SnmpV2Notification object |
Method Summary | |
String |
getIpAddress()
Returns the trap sender's IP address |
SnmpVarBind[] |
getObjects()
Returns the OBJECTS variable bindings as defined in MIB. |
SnmpOID |
getSnmpTrapOID()
Returns the snmpTrapOID.0 value contained in this trap. |
long |
getSysUpTime()
Returns the sysUpTime value contained in this trap |
String |
getSysUpTimeString()
Returns the string representation of sysUpTime value contained in this trap, such as "10 hours 5 minutes 20 seconds". |
void |
setIpAddress(InetAddress addr)
Sets trap sender's ip address |
void |
setIpAddress(String ipAddr)
Sets trap sender's ip address |
void |
setSysUpTime(long time)
Sets a new sysUpTime |
String |
toString()
Returns a string representation of this trap object |
Methods inherited from class com.ireasoning.protocol.snmp.SnmpPdu |
copy, decodePdu, encode, encodePdu, getCommand, getCommunity, getContextEngineID, getContextName, getDestinationAddress, getDestinationPort, getErrorIndex, getErrorStatus, getErrorStatusString, getErrorStatusString, getErrorString, getMaxRepetitions, getNonRepeaters, getRequestID, getSourceAddress, getSourcePort, getType, getTypeString, getVersion, hasMore, setCommand, setCommunity, setContextEngineID, setContextName, setDestinationAddress, setDestinationPort, setErrorIndex, setErrorStatus, setHasMore, setMaxRepetitions, setNonRepeaters, setOID, setOID, setOIDs, setOIDs, setRequestID, setSourceAddress, setSourcePort, setVersion |
Methods inherited from class com.ireasoning.protocol.snmp.VarBindContainer |
addVarBind, addVarBinds, addVarBinds, getFirstVarBind, getLastVarBind, getVarBind, getVarBindCount, getVarBinds, removeAllVarBinds, removeAllVarBinds, removeVarBind, setVarBinds, setVarBinds |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface com.ireasoning.protocol.snmp.SnmpDataType |
equals, hashCode |
Field Detail |
public static final SnmpOID SYS_UP_TIME_OID
public static final SnmpOID SNMP_TRAP_OID
public static final SnmpOID SNMP_TRAP_ENTERPRISE_OID
public static final SnmpOID COLD_START_TRAP_OID
public static final SnmpOID WARM_START_TRAP_OID
public static final SnmpOID LINK_DOWN_TRAP_OID
public static final SnmpOID LINK_UP_TRAP_OID
public static final SnmpOID AUTHENTICATION_FAILURE_TRAP_OID
public static final SnmpOID EGPNEIGHBOR_LOSS_OID
Constructor Detail |
public SnmpV2Notification(long sysUpTime, SnmpOID snmpTrapOID, SnmpVarBind[] varbinds)
sysUpTime
- the sysUpTime valuesnmpTrapOID
- the snmpTrapOID valuevarbinds
- the other variable bindings of this trap objectpublic SnmpV2Notification(long sysUpTime, SnmpOID snmpTrapOID)
sysUpTime
- the sysUpTime valuesnmpTrapOID
- the snmpTrapOID valuepublic SnmpV2Notification(SnmpV2Notification notif)
SnmpV2Notification
objectMethod Detail |
public long getSysUpTime()
public void setSysUpTime(long time)
public String getSysUpTimeString()
public SnmpOID getSnmpTrapOID()
public SnmpVarBind[] getObjects()
snaNodeActFailTrap NOTIFICATION-TYPE OBJECTS { snaNodeOperName, snaNodeOperState, snaNodeOperActFailureReason } STATUS current DESCRIPTION "This trap indicates a Node activation failure. The value of snaNodeOperState indicates the current state after the activation attempt. The value of snaNodeOperActFailureReason indicates the failure reason." ::= { snaNodeTraps 2 }In this NOTIFICATION object, OBJECTS are { snaNodeOperName, snaNodeOperState, snaNodeOperActFailureReason }, this method will returns variable bindings corresponding to those objects.
public String getIpAddress()
getIpAddress
in class SnmpPdu
com.ireasoning.protocol.snmp.SnmpPdu
SnmpPdu.getSourceAddress()
public void setIpAddress(String ipAddr)
setIpAddress
in class SnmpPdu
com.ireasoning.protocol.snmp.SnmpPdu
SnmpPdu.setSourceAddress(java.lang.String)
public void setIpAddress(InetAddress addr)
public String toString()
toString
in class SnmpPdu
|
HOME | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |