public class BlockPdu
extends java.lang.Object
Pdu| Modifier and Type | Field and Description |
|---|---|
static int |
GET
The GET PDU type.
|
static int |
GETBULK
The GETBULK PDU type.
|
static int |
GETNEXT
The GETNEXT PDU type.
|
protected java.util.Vector |
reqVarbinds |
static int |
SET
The SET PDU type.
|
| Constructor and Description |
|---|
BlockPdu(SnmpContextBasisFace con)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addOid(AsnObjectId oid)
Adds an OID (object identifier) to the PDU.
|
void |
addOid(AsnObjectId oid,
AsnObject val)
Adds an OID (object identifier) to the PDU and the value that has
to be set.
|
void |
addOid(java.lang.String oid)
Adds an OID to the PDU.
|
void |
addOid(java.lang.String[] oids)
Adds a list of OIDs to the PDU.
|
void |
addOid(java.lang.String oid,
AsnObject val)
Adds an OID to the PDU and the value that has to be set.
|
void |
addOid(varbind var)
Adds an OID (object identifier) to the PDU.
|
int |
getErrorIndex()
Returns the error index of the PDU.
|
int |
getErrorStatus()
Returns the error status of the PDU.
|
java.lang.String |
getErrorStatusString()
Returns the error status string of the PDU.
|
AsnObject |
getResponseVariable()
Sends the request and waits (blocks) for the response.
|
varbind |
getResponseVariableBinding()
Sends the request and waits (blocks) for the response.
|
varbind[] |
getResponseVariableBindings()
Sends the request and waits (blocks) for the response.
|
AsnObject[] |
getResponseVariables()
Sends the request and waits (blocks) for the response.
|
protected varbind[] |
sendAndWait()
Sends the request and waits (blocks) for the response.
|
void |
setBulkParameters(int nr,
int mr)
Sets the getBulkRequest parameters.
|
void |
setPduType(int newType)
Sets the type of PDU.
|
void |
setRetryIntervals(int[] retryIntervals)
Sets the retry intervals of the PDU.
|
public static final int GET
public static final int SET
public static final int GETNEXT
public static final int GETBULK
protected java.util.Vector reqVarbinds
public BlockPdu(SnmpContextBasisFace con)
con - The context of the requestpublic void addOid(java.lang.String oid)
oid - The oidPdu.addOid(String)public void addOid(java.lang.String oid,
AsnObject val)
oid - The oidPdu.addOid(String, AsnObject),
SETpublic void addOid(AsnObjectId oid, AsnObject val)
oid - The oidval - The valuePdu.addOid(AsnObjectId, AsnObject),
varbindpublic void addOid(AsnObjectId oid)
oid - The oidPdu.addOid(AsnObjectId),
varbindpublic void addOid(varbind var)
var - The varbindaddOid(String)public void setBulkParameters(int nr,
int mr)
nr - The non repeaters.mr - The max repetitions.GetBulkPdu.setMaxRepetitions(int),
GetBulkPdu.setNonRepeaters(int),
GETBULKpublic void addOid(java.lang.String[] oids)
oids - The OIDs to be addedpublic void setPduType(int newType)
public void setRetryIntervals(int[] retryIntervals)
retryIntervals - The interval in msec of each retryPdu.setRetryIntervals(int[])public AsnObject getResponseVariable() throws PduException, java.io.IOException
PduExceptionjava.io.IOExceptionsendAndWait()public AsnObject[] getResponseVariables() throws PduException, java.io.IOException
PduExceptionjava.io.IOExceptionsendAndWait()public varbind getResponseVariableBinding() throws PduException, java.io.IOException
PduExceptionjava.io.IOExceptionsendAndWait()public varbind[] getResponseVariableBindings() throws PduException, java.io.IOException
PduExceptionjava.io.IOExceptionsendAndWait()protected varbind[] sendAndWait() throws PduException, java.io.IOException
PduExceptionjava.io.IOExceptionPdu.send(),
Pdu.waitForSelf(),
Pdu.getResponseVarbinds()public int getErrorIndex()
Pdu.getErrorIndex()public int getErrorStatus()
Pdu.getErrorStatus()public java.lang.String getErrorStatusString()
Pdu.getErrorStatusString()