com.adventnet.snmp.mibs
Class MibErrorMessages

java.lang.Object
  |
  +--com.adventnet.snmp.mibs.MibErrorMessages

public class MibErrorMessages
extends java.lang.Object

The MibErrorMessages contains the information about the error corresponding to a particular check. All the error in the MIB corresponding to the particular check are stored in a single MibErrorMessages object.

A typical error message will look as follows

ERR-168     The IMPLIED keyword can be associated only with the last object in the INDEX clause.
lineNo     colNo     Error
329 8 The index 'advNumIndex' defined as IMPLIED, is not the last object
1118 12 The index 'advCountIndex' defined as IMPLIED, is not the last object

The MibErrorMessages can be obtained as follows

 Vector errVect = mibops.getErrorMessages("moduleName");
 if(!errVect.isEmpty())
 {
  MibErrorMessages mibErrMesg = (MibErrorMessages)errVect.elementAt(0);
 }
 

The size of the Vector will be the number of grouped error available in the MIB. If there are no error in the MIB then the Vector will be empty.

Since:
AdventNet SNMP API 4

Method Summary
 byte getErrorCode()
          Gets the error code in byte.
 java.lang.String getErrorMessage()
          Gets the general error message associated with this error.
 java.util.Vector getErrorObjects()
          Returns a Vector of ErrorObject objects corresponding to this error.
 java.lang.String getType()
          Returns the type of the error.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getErrorCode

public byte getErrorCode()
Gets the error code in byte.

Returns:
byte - the error code

getErrorMessage

public java.lang.String getErrorMessage()
Gets the general error message associated with this error. Considering the example error message given in the introduction of this class this method will return the String "The IMPLIED keyword can be associated only with the last object in the INDEX clause."

Returns:
String - the general error message for this error.

getType

public java.lang.String getType()
Returns the type of the error. The types of error are CRT, ERR and INF. The type CRT denotes that the error is very critical. The MIB will not be loaded if it encounters any critical error.
ERR indicates the next level of errors. INF denotes that the message is an information.

Considering the example error message given in the introduction of this class this method will return the String "ERR-168".

Returns:
the error type as String

getErrorObjects

public java.util.Vector getErrorObjects()
Returns a Vector of ErrorObject objects corresponding to this error.

This ErrorObject contains the line number, column number and the specific error message.

In the example given above, the line number '329' column number '8' and the error String "The index 'advNumIndex' defined as IMPLIED, is not the last object" constitute a single ErrorObject. The size of the Vector returned by this method will be the number of such errors present in the MIB corresponding to the specific check.

Returns:
Vector of ErrorObject objects


Copyright (c)AdventNet Inc., 1996-2006