com.adventnet.snmp.snmp2.agent
Class AgentRuntimeException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.lang.RuntimeException
                    |
                    +--com.adventnet.snmp.snmp2.agent.AgentRuntimeException

public class AgentRuntimeException
extends java.lang.RuntimeException

The purpose of this class is to catch and report Agent side errors

See Also:
Serialized Form

Field Summary
(package private)  int errindex
           
(package private)  byte errstat
           
(package private)  byte errvalue
           
 
Constructor Summary
AgentRuntimeException()
          Constructor for AgentRunTimeException.
AgentRuntimeException(java.lang.String s)
          Constructs a AgentRuntimeException with the specified detail message.
AgentRuntimeException(java.lang.String s, byte errstat)
          Constructs a AgentRuntimeException with the specified detail message and error status.
AgentRuntimeException(java.lang.String s, byte errstat, byte errvalue)
          Constructs a AgentRuntimeException with the specified detail message error status and value.
 
Method Summary
 byte getErrstat()
          Gets for errstat to be sent along wih the exception which will be caught at the agentside and set to appropriate value in response PDU .
 byte getErrvalue()
          gets the errvalue for v2c and v3
 void setErrstat(byte err)
          sets for errstat value
 void setErrvalue(byte err)
          sets the errvalue for v2c ad v3
 java.lang.String toString()
          Getter for the string representation of the exception.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

errstat

byte errstat

errvalue

byte errvalue

errindex

int errindex
Constructor Detail

AgentRuntimeException

public AgentRuntimeException()
Constructor for AgentRunTimeException.

AgentRuntimeException

public AgentRuntimeException(java.lang.String s)
Constructs a AgentRuntimeException with the specified detail message. Detail message is a String that describes this particular exception.
Parameters:
s - the detail message

AgentRuntimeException

public AgentRuntimeException(java.lang.String s,
                             byte errstat)
Constructs a AgentRuntimeException with the specified detail message and error status.

Detail message is a String that describes this particular exception. Error status is a byte described the status of the exception.

Parameters:
s - the detail message
errstat - the error status

AgentRuntimeException

public AgentRuntimeException(java.lang.String s,
                             byte errstat,
                             byte errvalue)
Constructs a AgentRuntimeException with the specified detail message error status and value.

Detail message is a String that describes this particular exception Error status is a byte described the status of the exception. Error value is a byte described the value of the exception.

Parameters:
s - the detail message
errstat - the error status
errvalue - the error value
Method Detail

getErrstat

public byte getErrstat()
Gets for errstat to be sent along wih the exception which will be caught at the agentside and set to appropriate value in response PDU .
Returns:
the error status

setErrstat

public void setErrstat(byte err)
sets for errstat value
Parameters:
err - the error status

getErrvalue

public byte getErrvalue()
gets the errvalue for v2c and v3
Returns:
the error value

setErrvalue

public void setErrvalue(byte err)
sets the errvalue for v2c ad v3
Parameters:
err - the error value

toString

public java.lang.String toString()
Getter for the string representation of the exception.
Overrides:
toString in class java.lang.Throwable
Returns:
the exception string.