Module org.snmp4j

Class TableEvent

All Implemented Interfaces:
Serializable

public class TableEvent extends RetrievalEvent
The TableEvent class reports events in a table retrieval operation.
Since:
1.0.2
Version:
1.8
Author:
Frank Fock
See Also:
  • Constructor Details

    • TableEvent

      protected TableEvent(TableUtils.TableRequest source, Object userObject)
    • TableEvent

      public TableEvent(TableUtils.TableRequest source, Object userObject, int status)
      Creates a table event with a status.
      Parameters:
      source - the source of the event.
      userObject - the user object or null.
      status - one of the status constants defined for this object.
    • TableEvent

      public TableEvent(TableUtils.TableRequest source, Object userObject, Exception exception)
      Creates a table event with an exception.
      Parameters:
      source - the source of the event.
      userObject - the user object or null.
      exception - an exception instance.
    • TableEvent

      public TableEvent(TableUtils.TableRequest source, Object userObject, PDU report)
      Creates a table event with a report PDU.
      Parameters:
      source - the source of the event.
      userObject - the user object or null.
      report - a PDU of type PDU.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 or null.
      index - the index OID of the row.
      cols - an array of VariableBinding instances containing the elements of the row. The array may contain null elements which indicates that the agent does not return an instance for that column and row index. If an element is not null, then the OID of the variable binding contains the full instance OID (i.e., table OID + column ID + row index) of the variable.
  • Method Details

    • getIndex

      public OID getIndex()
      Gets the row index OID.
      Returns:
      the row's index OID or null if RetrievalEvent.isError() returns true.
    • getColumns

      public VariableBinding[] getColumns()
      Gets the columnar objects of the row.
      Returns:
      an array of VariableBinding instances containing the elements of the row. The array may contain null elements which indicates that the agent does not return an instance for that column and row index. If an element is not null, then the OID of the variable binding contains the full instance OID of the variable.

      If RetrievalEvent.isError() returns true, null will be returned.

    • toString

      public String toString()
      Overrides:
      toString in class RetrievalEvent