com.tivoli.twg.snmp
Class SNMPPDU

java.lang.Object
  extended byjava.util.Observable
      extended bycom.tivoli.twg.snmp.SNMPPDU

public class SNMPPDU
extends java.util.Observable

This class represents an SNMP PDU. One is required for every request sent, and one will be provided for each response, and trap received. In order to issue a request, it is required to register as an observer of the newly created instance. Submition of the PDU to the stack will fail without at least one observer, unless the PDU is a trap. The observer is required as the notification mechanism when the PDU has either timed out, or the response has been received.

See Also:
SNMP, SNMPContext, SNMPEntity

Field Summary
 int Err
           
static int SNMP_PDU_GET
           
static int SNMP_PDU_GETBULK
           
static int SNMP_PDU_GETNEXT
           
static int SNMP_PDU_INFORM
           
static int SNMP_PDU_RESPONSE
           
static int SNMP_PDU_SET
           
static int SNMP_PDU_V1TRAP
           
static int SNMP_PDU_V2TRAP
           
static int SNMP_SYNTAX_BITS
           
static int SNMP_SYNTAX_CNTR32
           
static int SNMP_SYNTAX_CNTR64
           
static int SNMP_SYNTAX_EMPTY
           
static int SNMP_SYNTAX_ENDOFMIBVIEW
           
static int SNMP_SYNTAX_GAUGE32
           
static int SNMP_SYNTAX_INT
           
static int SNMP_SYNTAX_INT32
           
static int SNMP_SYNTAX_IPADDR
           
static int SNMP_SYNTAX_NOSUCHINSTANCE
           
static int SNMP_SYNTAX_NOSUCHOBJECT
           
static int SNMP_SYNTAX_NSAPADDR
           
static int SNMP_SYNTAX_NULL
           
static int SNMP_SYNTAX_OCTETS
           
static int SNMP_SYNTAX_OID
           
static int SNMP_SYNTAX_OPAQUE
           
static int SNMP_SYNTAX_SEQUENCE
           
static int SNMP_SYNTAX_TIMETICKS
           
static int SNMP_SYNTAX_UINT32
           
static int SNMP_TRAP_AUTHFAIL
           
static int SNMP_TRAP_COLDSTART
           
static int SNMP_TRAP_EGPNEIGHBORLOSS
           
static int SNMP_TRAP_ENTERPRISESPECIFIC
           
static int SNMP_TRAP_LINKDOWN
           
static int SNMP_TRAP_LINKUP
           
static int SNMP_TRAP_WARMSTART
           
 int Type
           
 
Constructor Summary
  SNMPPDU(int pduType)
          Construct An SNMPPDU for building a Get, Set, GetNext request.
  SNMPPDU(int pduType, java.util.Observer observer)
          Construct An SNMPPDU for building a Get, Set, GetNext, GetBulk request.
  SNMPPDU(SNMP Session, int PDU_Type)
          Deprecated.  
  SNMPPDU(SNMP Session, int PDU_Type, java.util.Observer Done)
          Deprecated.  
  SNMPPDU(SNMPPDU pdu)
          Copy constructor
protected SNMPPDU(SnmpPDU rsp, SNMPEntity source, SNMPContext context)
          Construct a SNMPPDU representing a response PDU
 
Method Summary
 int AddVblItem(int Item, java.lang.String OID)
          This method will add an empty item into/in the PDUs VBL.
 int AddVblItem(int Item, java.lang.String OID, int Type)
          This method will add or update a NULL item into/in the PDUs VBL.
 int AddVblItem(int Item, java.lang.String OID, int Type, byte[] Octets)
          This method will add or update a string/octet item into/in the PDUs VBL.
 int AddVblItem(int Item, java.lang.String OID, int Type, int smiIntx)
          This method will add or update an integer item into/in the PDUs VBL.
 int AddVblItem(int Item, java.lang.String OID, int Type, int len, byte[] Octets)
          Deprecated. Use same method without len parm.
 int AddVblItem(int Item, java.lang.String OID, int Type, long smiLong)
          This method will add or update a long item into/in the PDUs VBL.
 int AddVblItem(int Item, java.lang.String OID, int Type, java.lang.String smiOCTETS)
          This method will add or update a string/octet item into/in the PDUs VBL.
 int DeleteVblItem(int Item)
          Deprecated. Only for native code which is no longer included
 void Done()
          Deprecated.  
protected  int GetCorrelator()
          INTERNAL USE ONLY
 byte[] getEngineID()
          Returns the context engine ID for this response PDU.
 int GetError()
          This method will return the Status code for this PDU.
 int getMaxRepetitions()
          This method will get the maximum number of repetitions for a Get Bulk Request PDU.
 int getNonRepeaters()
          This method will get the number of non-repeaters for a Get Bulk Request PDU.
 int GetReqID()
          This method will return the Request ID assigned to this PDU transaction.
 SNMPContext GetResponseContext()
          This method will return the Destination Context for the response.
 SNMPEntity GetResponseDest()
          This method will return the Destination Entity for the response.
 SNMPPDU GetResponsePDU()
          This method will return the Response PDU for this request, assuming it has completed normally.
 SNMPEntity GetResponseSrc()
          This method will return the Source Entity for the response.
protected  SnmpPDU getSnmpPDU(SNMPEntity sourceEntity, SnmpPDU pdu)
          Return the this PDU in the form of a SnmpPDU
protected  SnmpTrap getSnmpTrap(SNMPEntity sourceEntity, SnmpTrap trap)
          Return the this PDU in the form of a SnmpTrap
protected  SnmpV2PDU getSnmpV2PDU(SNMPEntity sourceEntity, SnmpV2PDU pdu)
          Return the this PDU in the form of a SnmpV2PDU
protected  SnmpV3PDU getSnmpV3PDU(SNMPEntity sourceEntity, SnmpV3PDU pdu)
          Return the this PDU in the form of a SnmpV3PDU
 int GetType()
          This method will return the Type of this PDU (See the Constructors for a list).
 int GetVblCount()
          This method will return the number of Variable Binding (VarBind) elements in this PDU.
 int GetVblInt(int vblIndex)
          This method will return the value for an integer type VBL item.
 long GetVblint64(int vblIndex)
          Deprecated. Use GetVblInt64 instead
 long GetVblInt64(int vblIndex)
          This method will return the value for an Counter64 type VBL item.
 java.lang.String GetVblItemName(int vblIndex)
          This method will return the OID name for this item in the VBL.
 int GetVblItemType(int vblIndex)
          This method will return the SNMP type of the VBL item requested.
 byte[] GetVblOctet(int vblIndex)
          This method will return the value for an Octet type VBL item.
 java.lang.String GetVblOID(int vblIndex)
          This method will return the value for a OID type VBL item.
 java.lang.String GetVblString(int vblIndex)
          This method will return the value for a String type VBL item.
 int getVersion()
          Sets the SNMP version for this PDU
 boolean IsTimedOut()
          This method will return the Timeout status of this PDU.
 boolean IsVblItemValid(int vblIndex)
          This method will test to see if there is a valid VBL item present.
protected  void loadVarBindList(java.util.Vector vblist, int maxVarbind)
          Load varbind list from SnmpMetaPDU varbind list (Vector instance)
 void printTrap()
          Print the details of the trap and varbinds to standard out
 void setMaxRepetitions(int maxRepetitions)
          This method will set the maximum number of repetitions for a Get Bulk Request PDU.
 void setNonRepeaters(int nonRepeaters)
          This method will set the number of non-repeaters for a Get Bulk Request PDU.
protected  void SetResponseDone(SNMPEntity Src, SNMPEntity Dest, SNMPContext Context, SNMPPDU Resp)
          INTERNAL USE ONLY
protected  void SetTimeoutState(SNMPEntity Src, SNMPEntity Dest, SNMPContext Context, int Err)
          INTERNAL USE ONLY
protected  void SetTrapInfo(SNMPEntity Src, SNMPEntity Dest, SNMPContext Context)
          INTERNAL USE ONLY
 void setVersion(int version)
          Sets the SNMP version for this PDU
 java.lang.String toString()
           
 void VBLUpdate(int Item, int Type, java.lang.String OID, byte[] Value, java.lang.String SValue)
          INTERNAL USE ONLY
 void VBLUpdate(int Item, int Type, java.lang.String OID, int Value)
          INTERNAL USE ONLY
 void VBLUpdate(int Item, int Type, java.lang.String OID, long Value)
          INTERNAL USE ONLY
 void VBLUpdate(int Item, int Type, java.lang.String OID, java.lang.String Value)
          INTERNAL USE ONLY
 
Methods inherited from class java.util.Observable
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

SNMP_PDU_GET

public static final int SNMP_PDU_GET
See Also:
Constant Field Values

SNMP_PDU_GETNEXT

public static final int SNMP_PDU_GETNEXT
See Also:
Constant Field Values

SNMP_PDU_RESPONSE

public static final int SNMP_PDU_RESPONSE
See Also:
Constant Field Values

SNMP_PDU_SET

public static final int SNMP_PDU_SET
See Also:
Constant Field Values

SNMP_PDU_V1TRAP

public static final int SNMP_PDU_V1TRAP
See Also:
Constant Field Values

SNMP_PDU_GETBULK

public static final int SNMP_PDU_GETBULK
See Also:
Constant Field Values

SNMP_PDU_INFORM

public static final int SNMP_PDU_INFORM
See Also:
Constant Field Values

SNMP_PDU_V2TRAP

public static final int SNMP_PDU_V2TRAP
See Also:
Constant Field Values

SNMP_SYNTAX_SEQUENCE

public static final int SNMP_SYNTAX_SEQUENCE
See Also:
Constant Field Values

SNMP_SYNTAX_INT

public static final int SNMP_SYNTAX_INT
See Also:
Constant Field Values

SNMP_SYNTAX_BITS

public static final int SNMP_SYNTAX_BITS
See Also:
Constant Field Values

SNMP_SYNTAX_OCTETS

public static final int SNMP_SYNTAX_OCTETS
See Also:
Constant Field Values

SNMP_SYNTAX_NULL

public static final int SNMP_SYNTAX_NULL
See Also:
Constant Field Values

SNMP_SYNTAX_OID

public static final int SNMP_SYNTAX_OID
See Also:
Constant Field Values

SNMP_SYNTAX_INT32

public static final int SNMP_SYNTAX_INT32
See Also:
Constant Field Values

SNMP_SYNTAX_IPADDR

public static final int SNMP_SYNTAX_IPADDR
See Also:
Constant Field Values

SNMP_SYNTAX_CNTR32

public static final int SNMP_SYNTAX_CNTR32
See Also:
Constant Field Values

SNMP_SYNTAX_GAUGE32

public static final int SNMP_SYNTAX_GAUGE32
See Also:
Constant Field Values

SNMP_SYNTAX_TIMETICKS

public static final int SNMP_SYNTAX_TIMETICKS
See Also:
Constant Field Values

SNMP_SYNTAX_OPAQUE

public static final int SNMP_SYNTAX_OPAQUE
See Also:
Constant Field Values

SNMP_SYNTAX_NSAPADDR

public static final int SNMP_SYNTAX_NSAPADDR
See Also:
Constant Field Values

SNMP_SYNTAX_CNTR64

public static final int SNMP_SYNTAX_CNTR64
See Also:
Constant Field Values

SNMP_SYNTAX_UINT32

public static final int SNMP_SYNTAX_UINT32
See Also:
Constant Field Values

SNMP_SYNTAX_NOSUCHOBJECT

public static final int SNMP_SYNTAX_NOSUCHOBJECT
See Also:
Constant Field Values

SNMP_SYNTAX_NOSUCHINSTANCE

public static final int SNMP_SYNTAX_NOSUCHINSTANCE
See Also:
Constant Field Values

SNMP_SYNTAX_ENDOFMIBVIEW

public static final int SNMP_SYNTAX_ENDOFMIBVIEW
See Also:
Constant Field Values

SNMP_SYNTAX_EMPTY

public static final int SNMP_SYNTAX_EMPTY
See Also:
Constant Field Values

SNMP_TRAP_COLDSTART

public static final int SNMP_TRAP_COLDSTART
See Also:
Constant Field Values

SNMP_TRAP_WARMSTART

public static final int SNMP_TRAP_WARMSTART
See Also:
Constant Field Values

SNMP_TRAP_LINKDOWN

public static final int SNMP_TRAP_LINKDOWN
See Also:
Constant Field Values

SNMP_TRAP_LINKUP

public static final int SNMP_TRAP_LINKUP
See Also:
Constant Field Values

SNMP_TRAP_AUTHFAIL

public static final int SNMP_TRAP_AUTHFAIL
See Also:
Constant Field Values

SNMP_TRAP_EGPNEIGHBORLOSS

public static final int SNMP_TRAP_EGPNEIGHBORLOSS
See Also:
Constant Field Values

SNMP_TRAP_ENTERPRISESPECIFIC

public static final int SNMP_TRAP_ENTERPRISESPECIFIC
See Also:
Constant Field Values

Err

public int Err

Type

public int Type
Constructor Detail

SNMPPDU

public SNMPPDU(int pduType)
Construct An SNMPPDU for building a Get, Set, GetNext request. This version of the constructor will create a PDU that is suitable for use as a trap, or response frame only, unless the owner does an explicit: addObserver(Observer); call, to register for notification of completion.

Parameters:
pduType - Can be one of the following: SNMP_PDU_GET SNMP_PDU_GETNEXT SNMP_PDU_SET SNMP_PDU_V1TRAP SNMP_PDU_GETBULK SNMP_PDU_INFORM SNMP_PDU_V2TRAP

SNMPPDU

public SNMPPDU(int pduType,
               java.util.Observer observer)
Construct An SNMPPDU for building a Get, Set, GetNext, GetBulk request. This version of the constructor will create a PDU that is suitable for use as a Get, Set, GetNext, GetBulk PDUs. The registered Observer will be informed when the processing of this PDU is complete. Note that additional observers can be included in the completion notification, but it will require explicit calls on the part of the owning instance to addObserver(Observer) to do that.

Parameters:
pduType - Can be one of the following: SNMP_PDU_GET SNMP_PDU_GETNEXT SNMP_PDU_SET SNMP_PDU_V1TRAP SNMP_PDU_GETBULK SNMP_PDU_INFORM SNMP_PDU_V2TRAP
observer - An instance of the Observer class that will be informed when the processing of this PDU has completed. That can be through the receipt of a response, or a timeout. This value is ignored if pduType is a trap.

SNMPPDU

public SNMPPDU(SNMPPDU pdu)
Copy constructor

Parameters:
pdu - PDU to copy

SNMPPDU

public SNMPPDU(SNMP Session,
               int PDU_Type)
Deprecated.  

Construct An SNMPPDU for building a Get, Set, GetNext request.


SNMPPDU

public SNMPPDU(SNMP Session,
               int PDU_Type,
               java.util.Observer Done)
Deprecated.  

Construct An SNMPPDU for building a Get, Set, GetNext request.


SNMPPDU

protected SNMPPDU(SnmpPDU rsp,
                  SNMPEntity source,
                  SNMPContext context)
Construct a SNMPPDU representing a response PDU

Method Detail

toString

public java.lang.String toString()

loadVarBindList

protected void loadVarBindList(java.util.Vector vblist,
                               int maxVarbind)
Load varbind list from SnmpMetaPDU varbind list (Vector instance)


printTrap

public void printTrap()
Print the details of the trap and varbinds to standard out


SetTrapInfo

protected final void SetTrapInfo(SNMPEntity Src,
                                 SNMPEntity Dest,
                                 SNMPContext Context)
INTERNAL USE ONLY


SetTimeoutState

protected final void SetTimeoutState(SNMPEntity Src,
                                     SNMPEntity Dest,
                                     SNMPContext Context,
                                     int Err)
INTERNAL USE ONLY


SetResponseDone

protected final void SetResponseDone(SNMPEntity Src,
                                     SNMPEntity Dest,
                                     SNMPContext Context,
                                     SNMPPDU Resp)
INTERNAL USE ONLY


GetCorrelator

protected final int GetCorrelator()
INTERNAL USE ONLY


GetReqID

public final int GetReqID()
This method will return the Request ID assigned to this PDU transaction.

Returns:
int Returns the PDU request ID.

GetType

public final int GetType()
This method will return the Type of this PDU (See the Constructors for a list).

Returns:
int Returns the PDU Type.

GetError

public final int GetError()
This method will return the Status code for this PDU.

Returns:
int Returns the status (Error) code for this PDU.

GetVblCount

public final int GetVblCount()
This method will return the number of Variable Binding (VarBind) elements in this PDU.

Returns:
int Returns the number of VBls in the PDU.

DeleteVblItem

public final int DeleteVblItem(int Item)
Deprecated. Only for native code which is no longer included

This method will delete the specified item in the VBL list. Note, that the Item numbers are 1 based.

Parameters:
Item - - the item number to be removed from the VBL. Again, these are 1 based.
Returns:
int Returns the general status of the operation.

AddVblItem

public final int AddVblItem(int Item,
                            java.lang.String OID,
                            int Type,
                            int smiIntx)
This method will add or update an integer item into/in the PDUs VBL.

Parameters:
Item - - the item number to be updated in the PDUs VBL. Note, if this value is zero, then this will be treated as an addition to the VBL, rather then an update.
OID - - this is the OID to be added, or in the case of an update operation, to replace the old one with, in the VBL.
Type - - one of the following SNMP types: SNMP_SYNTAX_INT SNMP_SYNTAX_INT32
smiIntx -
Returns:
int Returns the general status of the operation, where 1 = success.

AddVblItem

public final int AddVblItem(int Item,
                            java.lang.String OID)
This method will add an empty item into/in the PDUs VBL.

Parameters:
Item - - the item number to be updated in the PDUs VBL. Note, if this value is zero, then this will be treated as an addition to the VBL, rather then an update.
OID - - this is the OID to be added, or in the case of an update operation, to replace the old one with, in the VBL.
Returns:
int Returns the general status of the operation, where 1 = success.

AddVblItem

public final int AddVblItem(int Item,
                            java.lang.String OID,
                            int Type,
                            long smiLong)
This method will add or update a long item into/in the PDUs VBL.

Parameters:
Item - - the item number to be updated in the PDUs VBL. Note, if this value is zero, then this will be treated as an addition to the VBL, rather then an update.
OID - - this is the OID to be added, or in the case of an update operation, to replace the old one with, in the VBL.
Type - - one of the following SNMP types: SNMP_SYNTAX_UINT32 SNMP_SYNTAX_CNTR32 SNMP_SYNTAX_GAUGE32 SNMP_SYNTAX_TIMETICKS
smiLong -
Returns:
int Returns the general status of the operation, where 1 = success.

AddVblItem

public final int AddVblItem(int Item,
                            java.lang.String OID,
                            int Type,
                            java.lang.String smiOCTETS)
This method will add or update a string/octet item into/in the PDUs VBL.

Parameters:
Item - - the item number to be updated in the PDUs VBL. Note, if this value is zero, then this will be treated as an addition to the VBL, rather then an update.
OID - - this is the OID to be added, or in the case of an update operation, to replace the old one with, in the VBL.
Type - - one of the following SNMP types: SNMP_SYNTAX_IPADDR SNMP_SYNTAX_OID SNMP_SYNTAX_CNTR64
smiOCTETS - the octet value to add/update.
Returns:
int Returns the general status of the operation, where 1 = success.

AddVblItem

public final int AddVblItem(int Item,
                            java.lang.String OID,
                            int Type,
                            byte[] Octets)
This method will add or update a string/octet item into/in the PDUs VBL.

Parameters:
Item - - the item number to be updated in the PDUs VBL. Note, if this value is zero, then this will be treated as an addition to the VBL, rather then an update.
OID - - this is the OID to be added, or in the case of an update operation, to replace the old one with, in the VBL.
Type - - one of the following SNMP types: SNMP_SYNTAX_OCTETS SNMP_SYNTAX_BITS SNMP_SYNTAX_OPAQUE
Octets - the octet value to add/update.
Returns:
int Returns the general status of the operation, where 1 = success.

AddVblItem

public final int AddVblItem(int Item,
                            java.lang.String OID,
                            int Type,
                            int len,
                            byte[] Octets)
Deprecated. Use same method without len parm.

This method will add or update a string/octet item into/in the PDUs VBL.


AddVblItem

public final int AddVblItem(int Item,
                            java.lang.String OID,
                            int Type)
This method will add or update a NULL item into/in the PDUs VBL.

Parameters:
Item - - the item number to be updated in the PDUs VBL. Note, if this value is zero, then this will be treated as an addition to the VBL, rather then an update.
OID - - this is the OID to be added, or in the case of an update operation, to replace the old one with, in the VBL.
Type - - one of the following SNMP types: SNMP_SYNTAX_NULL SNMP_SYNTAX_NOSUCHOBJECT SNMP_SYNTAX_NOSUCHINSTANCE SNMP_SYNTAX_ENDOFMIBVIEW
Returns:
int Returns the general status of the operation, where 1 = success.

getMaxRepetitions

public int getMaxRepetitions()
This method will get the maximum number of repetitions for a Get Bulk Request PDU. For all other PDUs this value is ignored.

Returns:
the maximum number of oid repetitions

setMaxRepetitions

public void setMaxRepetitions(int maxRepetitions)
This method will set the maximum number of repetitions for a Get Bulk Request PDU. For all other PDUs this value is ignored.

Parameters:
maxRepetitions - the maximum number of oid repetitions

getNonRepeaters

public int getNonRepeaters()
This method will get the number of non-repeaters for a Get Bulk Request PDU. For all other PDUs this value is ignored.

Returns:
the number of oid non-repeaters

setNonRepeaters

public void setNonRepeaters(int nonRepeaters)
This method will set the number of non-repeaters for a Get Bulk Request PDU. For all other PDUs this value is ignored.

Parameters:
nonRepeaters - the number of oid non-repeaters

getVersion

public int getVersion()
Sets the SNMP version for this PDU

Returns:
version either 1 (for SNMPV1), 2 (for SNMPV2), or 3 for (SNMPv3)

setVersion

public void setVersion(int version)
Sets the SNMP version for this PDU

Parameters:
version - either 1 (for SNMPV1), 2 (for SNMPV2), or 3 for (SNMPv3)

getEngineID

public byte[] getEngineID()
Returns the context engine ID for this response PDU. The engine ID will be null for request PDUs. This will only be non-null when this is an SNMPv3 response PDU.

Returns:
context engine ID of SNMPv3 agent or null

GetVblItemType

public final int GetVblItemType(int vblIndex)
This method will return the SNMP type of the VBL item requested.

Parameters:
vblIndex - - the item number to be queried in the PDUs VBL.
Returns:
int Returns the Type of the VBL Item, one of the following: SNMP_SYNTAX_OID SNMP_SYNTAX_NULL SNMP_SYNTAX_NOSUCHOBJECT SNMP_SYNTAX_NOSUCHINSTANCE SNMP_SYNTAX_ENDOFMIBVIEW SNMP_SYNTAX_OCTETS SNMP_SYNTAX_BITS SNMP_SYNTAX_OPAQUE SNMP_SYNTAX_IPADDR SNMP_SYNTAX_CNTR64 SNMP_SYNTAX_INT SNMP_SYNTAX_INT32 SNMP_SYNTAX_UINT32 SNMP_SYNTAX_CNTR32 SNMP_SYNTAX_GAUGE32 SNMP_SYNTAX_TIMETICKS

IsVblItemValid

public final boolean IsVblItemValid(int vblIndex)
This method will test to see if there is a valid VBL item present. It is meant primarily to test to see if the response was included by the remote agent to a particular OID.

Parameters:
vblIndex -
Returns:
Boolean - True or False

GetVblItemName

public final java.lang.String GetVblItemName(int vblIndex)
This method will return the OID name for this item in the VBL.

Parameters:
vblIndex - - the item number to be queried in the PDUs VBL.
Returns:
String - the OID for this VBL item.

GetVblInt

public final int GetVblInt(int vblIndex)
This method will return the value for an integer type VBL item.

Parameters:
vblIndex - - the item number to be queried in the PDUs VBL.
Returns:
int - the value.

GetVblInt64

public final long GetVblInt64(int vblIndex)
This method will return the value for an Counter64 type VBL item.

Parameters:
vblIndex - - the item number to be queried in the PDUs VBL.
Returns:
long - the value.

GetVblint64

public final long GetVblint64(int vblIndex)
Deprecated. Use GetVblInt64 instead

This method will return the value for an Counter64 type VBL item.


GetVblString

public final java.lang.String GetVblString(int vblIndex)
This method will return the value for a String type VBL item.

Returns:
String - the value.

GetVblOctet

public final byte[] GetVblOctet(int vblIndex)
This method will return the value for an Octet type VBL item.

Parameters:
vblIndex - - the item number to be queried in the PDUs VBL.
Returns:
byte[] - the value.

GetVblOID

public final java.lang.String GetVblOID(int vblIndex)
This method will return the value for a OID type VBL item.

Parameters:
vblIndex - - the item number to be queried in the PDUs VBL.
Returns:
String - the value.

IsTimedOut

public final boolean IsTimedOut()
This method will return the Timeout status of this PDU.

Returns:
either true, if is has timedout, or false if there is a response present

GetResponsePDU

public final SNMPPDU GetResponsePDU()
This method will return the Response PDU for this request, assuming it has completed normally. If the request has not yet completed, then it will return a null.

Returns:
SNMPPDU instance that represents the response.

GetResponseSrc

public final SNMPEntity GetResponseSrc()
This method will return the Source Entity for the response.

Returns:
SNMPEntity that is the source information.

GetResponseDest

public final SNMPEntity GetResponseDest()
This method will return the Destination Entity for the response.

Returns:
SNMPEntity that is the Destination information.

GetResponseContext

public final SNMPContext GetResponseContext()
This method will return the Destination Context for the response.

Returns:
SNMPContext that is the Destination information.

VBLUpdate

public void VBLUpdate(int Item,
                      int Type,
                      java.lang.String OID,
                      int Value)
INTERNAL USE ONLY


VBLUpdate

public void VBLUpdate(int Item,
                      int Type,
                      java.lang.String OID,
                      long Value)
INTERNAL USE ONLY


VBLUpdate

public void VBLUpdate(int Item,
                      int Type,
                      java.lang.String OID,
                      java.lang.String Value)
INTERNAL USE ONLY


VBLUpdate

public void VBLUpdate(int Item,
                      int Type,
                      java.lang.String OID,
                      byte[] Value,
                      java.lang.String SValue)
INTERNAL USE ONLY


Done

public void Done()
Deprecated.  

Does nothing. Used to deconstruct. Now garbage collector will handle.


getSnmpV3PDU

protected SnmpV3PDU getSnmpV3PDU(SNMPEntity sourceEntity,
                                 SnmpV3PDU pdu)
Return the this PDU in the form of a SnmpV3PDU

Parameters:
pdu - SnmpV3PDU to start modifing with
Returns:
modified SnmpV3PDU similar to this PDU

getSnmpV2PDU

protected SnmpV2PDU getSnmpV2PDU(SNMPEntity sourceEntity,
                                 SnmpV2PDU pdu)
Return the this PDU in the form of a SnmpV2PDU

Parameters:
pdu - SnmpV2PDU to start modifing with
Returns:
modified SnmpV2PDU similar to this PDU

getSnmpPDU

protected SnmpPDU getSnmpPDU(SNMPEntity sourceEntity,
                             SnmpPDU pdu)
Return the this PDU in the form of a SnmpPDU

Parameters:
pdu - SnmpPDU to start modifing with
Returns:
modified SnmpPDU similar to this PDU

getSnmpTrap

protected SnmpTrap getSnmpTrap(SNMPEntity sourceEntity,
                               SnmpTrap trap)
Return the this PDU in the form of a SnmpTrap

Returns:
modified SnmpTrap similar to this PDU