java.lang.Object
java.util.EventObject
org.snmp4j.util.RetrievalEvent
org.snmp4j.util.TableEvent
- All Implemented Interfaces:
Serializable
The
TableEvent
class reports events in a table retrieval
operation.- Since:
- 1.0.2
- Version:
- 1.8
- Author:
- Frank Fock
- See Also:
-
Field Summary
Fields inherited from class org.snmp4j.util.RetrievalEvent
exception, reportPDU, status, STATUS_EXCEPTION, STATUS_OK, STATUS_REPORT, STATUS_ROW_LIMIT_REACHED, STATUS_TIMEOUT, STATUS_WRONG_ORDER, userObject, vbs
Fields inherited from class java.util.EventObject
source
-
Constructor Summary
ModifierConstructorDescriptionprotected
TableEvent
(TableUtils.TableRequest source, Object userObject) TableEvent
(TableUtils.TableRequest source, Object userObject, int status) Creates a table event with a status.TableEvent
(TableUtils.TableRequest source, Object userObject, Exception exception) Creates a table event with an exception.TableEvent
(TableUtils.TableRequest source, Object userObject, PDU report) Creates a table event with a report PDU.TableEvent
(TableUtils.TableRequest source, Object userObject, OID index, VariableBinding[] cols) Creates a table event with row data. -
Method Summary
Methods inherited from class org.snmp4j.util.RetrievalEvent
getErrorMessage, getException, getReportPDU, getStatus, getUserObject, isError
Methods inherited from class java.util.EventObject
getSource
-
Constructor Details
-
TableEvent
-
TableEvent
Creates a table event with a status.- Parameters:
source
- the source of the event.userObject
- the user object ornull
.status
- one of the status constants defined for this object.
-
TableEvent
Creates a table event with an exception.- Parameters:
source
- the source of the event.userObject
- the user object ornull
.exception
- an exception instance.
-
TableEvent
Creates a table event with a report PDU.- Parameters:
source
- the source of the event.userObject
- the user object ornull
.report
- a PDU of typePDU.REPORT
.
-
TableEvent
public TableEvent(TableUtils.TableRequest source, Object userObject, OID index, VariableBinding[] cols) Creates a table event with row data.- Parameters:
source
- the source of the event.userObject
- the user object ornull
.index
- the index OID of the row.cols
- an array ofVariableBinding
instances containing the elements of the row. The array may containnull
elements which indicates that the agent does not return an instance for that column and row index. If an element is notnull
, then theOID
of the variable binding contains the full instanceOID
(i.e., table OID + column ID + row index) of the variable.
-
-
Method Details
-
getIndex
Gets the row index OID.- Returns:
- the row's index OID or
null
ifRetrievalEvent.isError()
returnstrue
.
-
getColumns
Gets the columnar objects of the row.- Returns:
- an array of
VariableBinding
instances containing the elements of the row. The array may containnull
elements which indicates that the agent does not return an instance for that column and row index. If an element is notnull
, then theOID
of the variable binding contains the full instanceOID
of the variable.If
RetrievalEvent.isError()
returnstrue
,null
will be returned.
-
toString
- Overrides:
toString
in classRetrievalEvent
-