|
HOME | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.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 Form| Field 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, serialVersionUID, TIMETICKS, UNSIGNED32, VARBIND |
| Fields inherited from interface com.ireasoning.protocol.Msg |
ERROR_TYPE |
| Constructor Summary | |
SnmpV2Notification(long sysUpTime,
SnmpOID snmpTrapOID)
Creates an SnmpV2Notification object using passed parameters |
|
SnmpV2Notification(long sysUpTime,
SnmpOID snmpTrapOID,
SnmpVarBind[] varbinds)
Creates an 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 |
SnmpV1Trap |
toV1Trap()
Converts this v2 trap object to v1 trap according to RFC 2576 and RFC 2089. |
SnmpV1Trap |
toV1Trap(String ipAddress)
Converts this v2 trap object to v1 trap according to RFC 2576 and RFC 2089 |
| 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 object
public SnmpV2Notification(long sysUpTime,
SnmpOID snmpTrapOID)
sysUpTime - the sysUpTime valuesnmpTrapOID - the snmpTrapOID valuepublic SnmpV2Notification(SnmpV2Notification notif)
SnmpV2Notification object
| Method 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 SnmpPduSnmpPdu.getSourceAddress()public void setIpAddress(String ipAddr)
Note:
There's no IP address field in SNMPv2 TRAP/INFORM PDU. This method won't
change the IP address of the UDP packet.
setIpAddress in class SnmpPduSnmpPdu.setSourceAddress(java.lang.String)public void setIpAddress(InetAddress addr)
Note:
There's no IP address field in SNMPv2 TRAP/INFORM PDU. This method won't
change the IP address of the UDP packet.
public String toString()
toString in class SnmpPdupublic SnmpV1Trap toV1Trap()
public SnmpV1Trap toV1Trap(String ipAddress)
ipAddress - notification originator's IP address
|
HOME | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||