HOME

com.ireasoning.util
Class TrapNode

java.lang.Object
  extended bycom.ireasoning.util.TrapNode
All Implemented Interfaces:
Serializable

public class TrapNode
extends Object
implements Serializable

This class is a data structure representing SNMPV1 or SNMPV2 Traps in MIBs.

See Also:
Serialized Form

Constructor Summary
TrapNode()
          Constructor
TrapNode(MibTreeNode node)
          Constructs a TrapNode based on passed in SnmpV2 NOTIFICATION-TYPE object.
 
Method Summary
 String getDescription()
           
 String getEnterprise()
          Returns the enterprise value
 String getEnterpriseOID()
          Returns the enterprise oid
 MibTreeNode getMibTreeNode()
          Returns the MIB tree node object if this is a v2/v3 trap node.
 String getName()
          Returns trap name
 String[] getObjects()
          Returns the VARIABLE or OBJECTS clause
 String[] getObjectsOIDs()
          Returns variables or objects' corresponding OIDs, the same as getVariableOIDs method
 int getTrapNumber()
          Gets SNMPv1 trap number
 String[] getVariableOIDs()
          Returns variables or objects' corresponding OIDs
 String[] getVariables()
          Returns the VARIABLE or OBJECTS clause
 int getVersion()
          Returns the trap version, one of {SnmpConst.SNMPV1, SnmpConst.SNMPV2}
 boolean isGeneric()
          Returns true if it's SNMPv1 generic trap type
 void setEnterprise(String enterprise)
           
 void setEnterpriseOID(String enterpriseOID)
           
 void setName(String s)
           
 void setObjects(String[] s)
           
 void setObjectsOIDs(String[] s)
           
 void setTrapNumber(int i)
           
 void setValue(MibTreeNode node)
          Initializes itself based on values contained in passed node object
 void setVariableOIDs(String[] s)
           
 void setVariables(String[] s)
           
 void setVersion(int i)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TrapNode

public TrapNode()
Constructor


TrapNode

public TrapNode(MibTreeNode node)
Constructs a TrapNode based on passed in SnmpV2 NOTIFICATION-TYPE object.

Method Detail

setValue

public void setValue(MibTreeNode node)
Initializes itself based on values contained in passed node object


getMibTreeNode

public MibTreeNode getMibTreeNode()
Returns the MIB tree node object if this is a v2/v3 trap node. Returned mib tree node has more properties than this object, because this TrapNode object is constructed based on partial properties of MIB tree node object.


getTrapNumber

public int getTrapNumber()
Gets SNMPv1 trap number


setTrapNumber

public void setTrapNumber(int i)

getName

public String getName()
Returns trap name


setName

public void setName(String s)

getVariables

public String[] getVariables()
Returns the VARIABLE or OBJECTS clause


setVariables

public void setVariables(String[] s)

getObjects

public String[] getObjects()
Returns the VARIABLE or OBJECTS clause

See Also:
getVariables()

setObjects

public void setObjects(String[] s)

getVariableOIDs

public String[] getVariableOIDs()
Returns variables or objects' corresponding OIDs


setVariableOIDs

public void setVariableOIDs(String[] s)

getObjectsOIDs

public String[] getObjectsOIDs()
Returns variables or objects' corresponding OIDs, the same as getVariableOIDs method

See Also:
getVariableOIDs()

setObjectsOIDs

public void setObjectsOIDs(String[] s)
See Also:
setVariableOIDs(java.lang.String[])

getVersion

public int getVersion()
Returns the trap version, one of {SnmpConst.SNMPV1, SnmpConst.SNMPV2}


setVersion

public void setVersion(int i)

getEnterprise

public String getEnterprise()
Returns the enterprise value


setEnterprise

public void setEnterprise(String enterprise)

isGeneric

public boolean isGeneric()
Returns true if it's SNMPv1 generic trap type


getEnterpriseOID

public String getEnterpriseOID()
Returns the enterprise oid


setEnterpriseOID

public void setEnterpriseOID(String enterpriseOID)

getDescription

public String getDescription()

toString

public String toString()

HOME

Copyright © 2002 iReasoning Inc. All Rights Reserved.