net.sf.snmpadaptor4j.object
Class GenericSnmpTrap

java.lang.Object
  extended by net.sf.snmpadaptor4j.object.SnmpTrap
      extended by net.sf.snmpadaptor4j.object.GenericSnmpTrap
All Implemented Interfaces:
Serializable

public final class GenericSnmpTrap
extends SnmpTrap

Object representing a generic SNMP trap.

Author:
Jean-Philippe MINETTI
See Also:
Serialized Form

Constructor Summary
protected GenericSnmpTrap(long timeStamp, SnmpOid source, GenericSnmpTrapType type, Map<SnmpOid,SnmpTrapData> dataMap)
          Hidden constructor.
 
Method Summary
 boolean equals(Object obj)
           
 GenericSnmpTrapType getType()
          Returns the trap type.
 int hashCode()
           
 String toString()
           
 void traceTo(org.apache.log4j.Logger logger)
          Traces the content of SNMP trap to logs.
 
Methods inherited from class net.sf.snmpadaptor4j.object.SnmpTrap
getDataMap, getSource, getTimeStamp, newInstance, newInstance
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GenericSnmpTrap

protected GenericSnmpTrap(long timeStamp,
                          SnmpOid source,
                          GenericSnmpTrapType type,
                          Map<SnmpOid,SnmpTrapData> dataMap)
Hidden constructor.

Parameters:
timeStamp - Elapsed time in 100th of second since the application launch.
source - OID indexing the source of the trap.
type - Trap type.
dataMap - Map of "interesting" information.
See Also:
SnmpTrap.newInstance(long, SnmpOid, GenericSnmpTrapType, Map)
Method Detail

getType

public GenericSnmpTrapType getType()
Returns the trap type.

Returns:
Trap type.

traceTo

public void traceTo(org.apache.log4j.Logger logger)
Description copied from class: SnmpTrap
Traces the content of SNMP trap to logs.

Specified by:
traceTo in class SnmpTrap
Parameters:
logger - Logger (must not be NULL).

hashCode

public int hashCode()
Overrides:
hashCode in class SnmpTrap

equals

public boolean equals(Object obj)
Overrides:
equals in class SnmpTrap

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2012-2013 snmpAdaptor4j. All Rights Reserved.