public class SnmpRequest extends SnmpField
Modifier and Type | Class and Description |
---|---|
static class |
SnmpRequest.ErrorType |
NULL_FIELD
Modifier and Type | Method and Description |
---|---|
Object |
getAttachedObject()
Returns the attached object associated with this request (if one has been set).
|
SnmpRequest.ErrorType |
getError()
Returns the current response error.
|
String |
getLocalizedErrorDescription()
Returns the localized error description for the request.
|
String |
getLocalizedRequestResponseErrorDescription()
Returns the entire error description which is a combination of the request and response errors.
|
SnmpPdu |
getPdu() |
SnmpPduTrapV1 |
getPduTrapV1() |
SnmpResponse |
getResponse()
Returns the response received for this request (or null)
|
SnmpWalkTable |
getWalkTable()
Returns the walk table or null if it doesn't exist.
|
boolean |
isOk()
Query the state of the request.
|
void |
prepareBulkWalk()
Helper method to prepare the bulk walk.
|
void |
prepareGetNextWalk()
Helper method to prepare the non-bulk walk.
|
void |
prepareWalk() |
SnmpRequest |
setAttachedObject(Object attachedObject)
Attaches an object to this request so that it can be recovered when the listner is called back.
|
SnmpRequest |
setBulkWalkMaxReps(int bulkWalkMaxReps)
Used to configure a bulk walk request before sending.
|
SnmpRequest |
setBulkWalkType()
Sets the request type as
SnmpFieldType.GET_BULK_REQ . |
SnmpRequest |
setGetType()
Sets the request type as
SnmpFieldType.GET_REQ . |
SnmpRequest |
setSetType()
Sets the request type as
SnmpFieldType.SET_REQ . |
SnmpRequest |
setWalkType()
Sets the request type as
SnmpFieldType.GET_NEXT_REQ . |
SnmpRequest |
setWalkTypeByVersion()
Sets the request type as
SnmpFieldType.GET_NEXT_REQ or SnmpFieldType.GET_BULK_REQ
based on version. |
SnmpRequest |
setWalkTypeByVersion(int bulkWalkMaxReps)
Sets the request type as
SnmpFieldType.GET_NEXT_REQ or SnmpFieldType.GET_BULK_REQ
based on version. |
String |
toString() |
public SnmpRequest setBulkWalkMaxReps(int bulkWalkMaxReps)
bulkWalkMaxReps
- bulk walk max repetition countpublic SnmpRequest setGetType()
SnmpFieldType.GET_REQ
.public SnmpRequest setSetType()
SnmpFieldType.SET_REQ
.public SnmpRequest setBulkWalkType()
SnmpFieldType.GET_BULK_REQ
.public SnmpRequest setWalkTypeByVersion()
SnmpFieldType.GET_NEXT_REQ
or SnmpFieldType.GET_BULK_REQ
based on version. If bulk walk is available for this SNMP version the
DEFAULT_BULK_WALK_MAX_REPS
value will be used.public SnmpRequest setWalkTypeByVersion(int bulkWalkMaxReps)
SnmpFieldType.GET_NEXT_REQ
or SnmpFieldType.GET_BULK_REQ
based on version. If bulk walk is available for this SNMP version the passed in max repetition count
will be used.bulkWalkMaxReps
- bulk walk max repetition countpublic SnmpRequest setWalkType()
SnmpFieldType.GET_NEXT_REQ
.public SnmpRequest setAttachedObject(Object attachedObject)
attachedObject
- attached objectpublic SnmpResponse getResponse()
public SnmpRequest.ErrorType getError()
public String getLocalizedErrorDescription()
public String getLocalizedRequestResponseErrorDescription()
MissingResourceException
- if there is a problem with the resource bundlepublic boolean isOk()
public SnmpWalkTable getWalkTable()
public Object getAttachedObject()
public void prepareWalk()
public void prepareBulkWalk()
public void prepareGetNextWalk()
public SnmpPdu getPdu()
public SnmpPduTrapV1 getPduTrapV1()
Copyright © 2015. All Rights Reserved.