com.adventnet.snmp.snmp2
Class SnmpMessage

java.lang.Object
  |
  +--com.adventnet.snmp.snmp2.SnmpMessage
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
Snmp3Message

public class SnmpMessage
extends java.lang.Object
implements java.io.Serializable

This class encapsulates a v1 or v2c Snmp Message. when a SnmpPDU is instantiated, it instantiates the appropriate message object along with it. Applications must not instantiate SnmpMessage objects and should always use SnmpPDU. An instance of this is created everytime when an SnmpPDU is instantiated. It provides default authentication routines.

See Also:
Serialized Form

Constructor Summary
SnmpMessage(byte[] message)
          Constructs an SnmpMessage initialized with SNMP packet message byte array data.
 
Method Summary
 SnmpPDU getPDU()
          Returns the SnmpPDU instance associated with this message.
 void setMsgVersion(int v)
          Sets snmp Version number in PDU
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SnmpMessage

public SnmpMessage(byte[] message)
            throws SnmpException
Constructs an SnmpMessage initialized with SNMP packet message byte array data. The API user should not use this method.
Throws:
SnmpException - is thrown whenever an error occurs.
Method Detail

setMsgVersion

public void setMsgVersion(int v)
Sets snmp Version number in PDU

getPDU

public SnmpPDU getPDU()
Returns the SnmpPDU instance associated with this message.
Returns:
the SnmpPDU instance associated with this message.


Copyright (c)AdventNet Inc., 1996-2004