disman
Class SnmpException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--disman.DismanException
                    |
                    +--disman.SnmpException
Direct Known Subclasses:
DismanReadException, DismanWriteException, NoSuchRowException

public class SnmpException
extends DismanException

This class represents the exception that may be thrown by several methods of classes of the disman package. This exception indicates, that an error occurred while using the SNMP protocol for a set or a get operation.

See Also:
Serialized Form

Field Summary
 java.lang.Throwable lowLevelException
           
 
Constructor Summary
SnmpException(java.lang.String msg)
          Constructs an SnmpException with the specified detail message.
SnmpException(java.lang.Throwable e)
          Constructs an SnmpException from a low level exception.
SnmpException(java.lang.Throwable e, java.lang.String msg)
          Constructs an SnmpException from a low level exception and an independent detail message.
 
Method Summary
 boolean isInconsistentValueResponse()
          Returns true if the exception is an SnmpResponseException with error status inconsistentValue(12).
 boolean isNoSuchNameResponse()
          Returns true if the exception is an SnmpResponseException with error status noSuchName(2).
protected static java.lang.String translateOid(java.lang.String oid)
          Interpret an OID String consisting of numbers and dots.
protected static java.lang.String translateValue(java.lang.String oid, long value)
          Interpret an int value depending of its corresponding OID.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

lowLevelException

public java.lang.Throwable lowLevelException
Constructor Detail

SnmpException

public SnmpException(java.lang.String msg)
Constructs an SnmpException with the specified detail message.

SnmpException

public SnmpException(java.lang.Throwable e)
Constructs an SnmpException from a low level exception.

SnmpException

public SnmpException(java.lang.Throwable e,
                     java.lang.String msg)
Constructs an SnmpException from a low level exception and an independent detail message.
Method Detail

isNoSuchNameResponse

public boolean isNoSuchNameResponse()
Returns true if the exception is an SnmpResponseException with error status noSuchName(2).

isInconsistentValueResponse

public boolean isInconsistentValueResponse()
Returns true if the exception is an SnmpResponseException with error status inconsistentValue(12).

translateValue

protected static java.lang.String translateValue(java.lang.String oid,
                                                 long value)
Interpret an int value depending of its corresponding OID.

translateOid

protected static java.lang.String translateOid(java.lang.String oid)
Interpret an OID String consisting of numbers and dots. If it is an OID within the Script MIB, the String is translated to a more readable form.