Package org.snmp4j.util
Class TableEvent
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_TIMEOUT, STATUS_WRONG_ORDER, userObject, vbsFields inherited from class java.util.EventObject
source - 
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedTableEvent(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, isErrorMethods 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 ofVariableBindinginstances containing the elements of the row. The array may containnullelements which indicates that the agent does not return an instance for that column and row index. If an element is notnull, then theOIDof 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 
nullifRetrievalEvent.isError()returnstrue. 
 - 
getColumns
Gets the columnar objects of the row.- Returns:
 - an array of 
VariableBindinginstances containing the elements of the row. The array may containnullelements which indicates that the agent does not return an instance for that column and row index. If an element is notnull, then theOIDof the variable binding contains the full instanceOIDof the variable.If
RetrievalEvent.isError()returnstrue,nullwill be returned. 
 - 
toString
- Overrides:
 toStringin classRetrievalEvent
 
 -