|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.util.EventObject | +--com.adventnet.snmp.beans.ResultEvent
This class is the event generated by objects that execute SNMP requests, e.g. SnmpTarget and SNMP Poller bean classes. It contains the result data from a poll, or other SNMP request.
You can get the SNMP response values, or Object IDs ,using the methods of this event object. The response PDU itself can be obtained with
(SnmpPDU) event.getResponse();although it is usually not necessary since most data of interest is available more directly.
SnmpRequestServer
,
SnmpTarget
,
SnmpPoller
, Serialized FormFields inherited from class java.util.EventObject |
source |
Constructor Summary | |
ResultEvent(java.lang.Object o)
This instantiates a result event with specified source |
|
ResultEvent(java.lang.Object o,
java.lang.Object response)
This instantiates a result event with specified source, and specified response object, i.e, the SNMP PDU for SNMP requests. |
|
ResultEvent(java.lang.Object o,
java.lang.Object response,
MibOperations mibOps)
This instantiates a result event with specified source, and specified response object, i.e, the SNMP PDU for SNMP requests. |
|
ResultEvent(java.lang.Object o,
java.lang.Object response,
java.lang.String error)
This instantiates a result event with specified source, specified variable bindings, and specified error message. |
|
ResultEvent(java.lang.Object o,
java.lang.Object response,
java.lang.String error,
int failedreqid)
This instantiates a result event with specified source, specified variable bindings, specified error message and failed reqestid. |
|
ResultEvent(java.lang.Object o,
java.lang.Object response,
java.lang.String error,
MibOperations mibOps)
This instantiates a result event with specified source, specified variable bindings, and specified error message. |
Method Summary | |
java.lang.String |
getErrorString()
Get the error string reported by the event generator. |
int |
getFailedRequestID()
Returns the request ID for failed requests, which may be necessary to track failed requests. |
long |
getNumericValue()
This returns the result Numeric value at index 0 as long. |
long |
getNumericValue(int index)
This returns the result Numeric value at specified index as long. |
java.math.BigInteger |
getNumericValueAsBigInt()
This returns the result Numeric value at index 0 as BigInteger. |
java.math.BigInteger |
getNumericValueAsBigInt(int index)
This returns the result Numeric value at specified index as BigInteger. |
long[] |
getNumericValues()
This returns the result Numeric values as long[]. |
java.math.BigInteger[] |
getNumericValuesAsBigInt()
This returns the result Numeric values as BigInteger[]. |
int |
getRequestID()
Returns the request ID, which may be necessary to track requests. |
java.lang.Object |
getResponse()
This returns the response object - SnmpPDU for SNMP requests |
java.lang.String |
getStringValue()
This returns the first result String value. |
java.lang.String |
getStringValue(int index)
This returns the result String value at requested index. |
java.lang.String[] |
getStringValues()
This returns the result String values as string array. |
java.lang.String |
getValue(int index)
Returns value at specified index as a String variable. |
java.lang.String[] |
getValues()
This returns the result variable values as string array. |
boolean |
isSuccess()
Returns whether the request succeeded or failed. |
Methods inherited from class java.util.EventObject |
getSource, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public ResultEvent(java.lang.Object o)
public ResultEvent(java.lang.Object o, java.lang.Object response)
public ResultEvent(java.lang.Object o, java.lang.Object response, MibOperations mibOps)
public ResultEvent(java.lang.Object o, java.lang.Object response, java.lang.String error)
public ResultEvent(java.lang.Object o, java.lang.Object response, java.lang.String error, MibOperations mibOps)
public ResultEvent(java.lang.Object o, java.lang.Object response, java.lang.String error, int failedreqid)
Method Detail |
public boolean isSuccess()
public java.lang.String getStringValue() throws DataException
DataException
- is thrown upon failurepublic java.lang.String getStringValue(int index) throws DataException
DataException
- is thrown upon failurepublic java.lang.String[] getStringValues() throws DataException
DataException
- is thrown upon failurepublic java.lang.String[] getValues() throws DataException
DataException
- is thrown upon failurepublic long[] getNumericValues() throws DataException
DataException
- is thrown upon failurepublic long getNumericValue() throws DataException
DataException
- is thrown upon failurepublic long getNumericValue(int index) throws DataException
DataException
- is thrown upon failure or non-numeric valuepublic java.math.BigInteger[] getNumericValuesAsBigInt() throws DataException
DataException
- is thrown upon failurepublic java.math.BigInteger getNumericValueAsBigInt() throws DataException
DataException
- is thrown upon failurepublic java.math.BigInteger getNumericValueAsBigInt(int index) throws DataException
DataException
- is thrown upon failure or non-numeric valuepublic java.lang.String getValue(int index) throws DataException
DataException
- if the data is not validpublic int getFailedRequestID()
public int getRequestID()
public java.lang.Object getResponse()
public java.lang.String getErrorString()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |