HOME

com.ireasoning.protocol.snmp
Class SnmpTrap

java.lang.Object
  extended bycom.ireasoning.protocol.snmp.VarBindContainer
      extended bycom.ireasoning.protocol.snmp.SnmpPdu
          extended bycom.ireasoning.protocol.snmp.SnmpV2Notification
              extended bycom.ireasoning.protocol.snmp.SnmpTrap
All Implemented Interfaces:
Msg, Serializable, SnmpDataType

public class SnmpTrap
extends SnmpV2Notification

This class represents SNMPv2 and SNMPv3 trap type object. SNMPv1 trap is represented by SnmpV1Trap class.

See Also:
SnmpV1Trap, SnmpInform, Serialized Form

Field Summary
 
Fields inherited from class com.ireasoning.protocol.snmp.SnmpV2Notification
AUTHENTICATION_FAILURE_TRAP_OID, COLD_START_TRAP_OID, EGPNEIGHBOR_LOSS_OID, LINK_DOWN_TRAP_OID, LINK_UP_TRAP_OID, SNMP_TRAP_ENTERPRISE_OID, SNMP_TRAP_OID, SYS_UP_TIME_OID, WARM_START_TRAP_OID
 
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
SnmpTrap(long sysUpTime, SnmpOID snmpTrapOID)
          Creates an SnmpTrap object using passed parameters
SnmpTrap(long sysUpTime, SnmpOID snmpTrapOID, SnmpVarBind[] varbinds)
          Creates an SnmpTrap object using passed parameters
SnmpTrap(SnmpTrap trap)
          Makes a copy of passed trap object
 
Method Summary
 SnmpDataType copy()
          Makes a copy of itself
 int getType()
          Returns SnmpConst.V2TRAP
 String getTypeString()
          Returns "V2Trap"
 
Methods inherited from class com.ireasoning.protocol.snmp.SnmpV2Notification
getIpAddress, getObjects, getSnmpTrapOID, getSysUpTime, getSysUpTimeString, setIpAddress, setIpAddress, setSysUpTime, toString, toV1Trap, toV1Trap
 
Methods inherited from class com.ireasoning.protocol.snmp.SnmpPdu
decodePdu, encode, encodePdu, getCommand, getCommunity, getContextEngineID, getContextName, getDestinationAddress, getDestinationPort, getErrorIndex, getErrorStatus, getErrorStatusString, getErrorStatusString, getErrorString, getMaxRepetitions, getNonRepeaters, getRequestID, getSnmpV3MsgHeader, getSnmpv3MsgSecurityParameters, getSourceAddress, getSourcePort, getVersion, hasMore, isSnmpV3AuthenticationFailed, 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
 

Constructor Detail

SnmpTrap

public SnmpTrap(long sysUpTime,
                SnmpOID snmpTrapOID,
                SnmpVarBind[] varbinds)
Creates an SnmpTrap object using passed parameters

Parameters:
sysUpTime - the sysUpTime value
snmpTrapOID - the snmpTrapOID value
varbinds - the other variable bindings of this trap object

SnmpTrap

public SnmpTrap(long sysUpTime,
                SnmpOID snmpTrapOID)
Creates an SnmpTrap object using passed parameters

Parameters:
sysUpTime - the sysUpTime value
snmpTrapOID - the snmpTrapOID value

SnmpTrap

public SnmpTrap(SnmpTrap trap)
Makes a copy of passed trap object

Method Detail

getType

public int getType()
Returns SnmpConst.V2TRAP

Specified by:
getType in interface SnmpDataType
Overrides:
getType in class SnmpPdu

getTypeString

public String getTypeString()
Returns "V2Trap"

Specified by:
getTypeString in interface SnmpDataType
Overrides:
getTypeString in class SnmpPdu

copy

public SnmpDataType copy()
Description copied from interface: SnmpDataType
Makes a copy of itself

Specified by:
copy in interface SnmpDataType
Overrides:
copy in class SnmpPdu

HOME

Copyright © 2002 iReasoning Inc. All Rights Reserved.