- java.lang.Object
-
- java.util.EventObject
-
- org.snmp4j.util.RetrievalEvent
-
- org.snmp4j.util.TableEvent
-
- All Implemented Interfaces:
java.io.Serializable
public class TableEvent extends RetrievalEvent
TheTableEventclass reports events in a table retrieval operation.- Since:
- 1.0.2
- Version:
- 1.8
- Author:
- Frank Fock
- See Also:
TableUtils, Serialized Form
-
-
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, vbs
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedTableEvent(TableUtils.TableRequest source, java.lang.Object userObject)TableEvent(TableUtils.TableRequest source, java.lang.Object userObject, int status)Creates a table event with a status.TableEvent(TableUtils.TableRequest source, java.lang.Object userObject, java.lang.Exception exception)Creates a table event with an exception.TableEvent(TableUtils.TableRequest source, java.lang.Object userObject, PDU report)Creates a table event with a report PDU.TableEvent(TableUtils.TableRequest source, java.lang.Object userObject, OID index, VariableBinding[] cols)Creates a table event with row data.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description VariableBinding[]getColumns()Gets the columnar objects of the row.OIDgetIndex()Gets the row index OID.java.lang.StringtoString()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from class org.snmp4j.util.RetrievalEvent
getErrorMessage, getException, getReportPDU, getStatus, getUserObject, isError
-
-
-
-
Constructor Detail
-
TableEvent
protected TableEvent(TableUtils.TableRequest source, java.lang.Object userObject)
-
TableEvent
public TableEvent(TableUtils.TableRequest source, java.lang.Object userObject, int status)
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
public TableEvent(TableUtils.TableRequest source, java.lang.Object userObject, java.lang.Exception exception)
Creates a table event with an exception.- Parameters:
source- the source of the event.userObject- the user object ornull.exception- an exception instance.
-
TableEvent
public TableEvent(TableUtils.TableRequest source, java.lang.Object userObject, PDU report)
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, java.lang.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 Detail
-
getIndex
public OID getIndex()
Gets the row index OID.- Returns:
- the row's index OID or
nullifRetrievalEvent.isError()returnstrue.
-
getColumns
public VariableBinding[] 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
public java.lang.String toString()
- Overrides:
toStringin classRetrievalEvent
-
-