org.snmp4j.util
Class TableEvent

java.lang.Object
  extended by java.util.EventObject
      extended by org.snmp4j.util.RetrievalEvent
          extended by org.snmp4j.util.TableEvent
All Implemented Interfaces:
java.io.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:
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
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
protected TableEvent(java.lang.Object source, java.lang.Object userObject)
           
  TableEvent(java.lang.Object source, java.lang.Object userObject, java.lang.Exception exception)
          Creates a table event with an exception.
  TableEvent(java.lang.Object source, java.lang.Object userObject, int status)
          Creates a table event with a status.
  TableEvent(java.lang.Object source, java.lang.Object userObject, OID index, VariableBinding[] cols)
          Creates a table event with row data.
  TableEvent(java.lang.Object source, java.lang.Object userObject, PDU report)
          Creates a table event with a report PDU.
 
Method Summary
 VariableBinding[] getColumns()
          Gets the columnar objects of the row.
 OID getIndex()
          Gets the row index OID.
 java.lang.String toString()
           
 
Methods inherited from class org.snmp4j.util.RetrievalEvent
getErrorMessage, getException, getReportPDU, getStatus, getUserObject, isError
 
Methods inherited from class java.util.EventObject
getSource
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TableEvent

protected TableEvent(java.lang.Object source,
                     java.lang.Object userObject)

TableEvent

public TableEvent(java.lang.Object 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 or null.
status - one of the status constants defined for this object.

TableEvent

public TableEvent(java.lang.Object 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 or null.
exception - an exception instance.

TableEvent

public TableEvent(java.lang.Object 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 or null.
report - a PDU of type PDU.REPORT.

TableEvent

public TableEvent(java.lang.Object 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 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 of the variable.
Method Detail

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 java.lang.String toString()
Overrides:
toString in class RetrievalEvent

Copyright 2005-2010 Frank Fock (SNMP4J.org)

Copyright © 2011 SNMP4J.org. All Rights Reserved.