com.sun.management.snmp
Class SnmpStatusException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by com.sun.management.snmp.SnmpStatusException
All Implemented Interfaces:
SnmpDefinitions, Serializable

public class SnmpStatusException
extends Exception
implements SnmpDefinitions

Reports an error which occurred during a get/set operation on a mib node. This exception includes a status error code as defined in the SNMP protocol.

Since:
Java DMK 5.1
See Also:
Serialized Form

Field Summary
static int badValue
          Error code as defined in RFC 1448 for: badValue.
static int noAccess
          Error code as defined in RFC 1448 for: noAccess.
static int noSuchInstance
          Error code for reporting a no such instance error.
static int noSuchName
          Error code as defined in RFC 1448 for: noSuchName.
static int noSuchObject
          Error code for reporting a no such object error.
static int readOnly
          Error code as defined in RFC 1448 for: readOnly.
 
Fields inherited from interface com.sun.management.snmp.SnmpDefinitions
authMask, authNoPriv, authPriv, authPrivMask, CtxtConsFlag, noAuthNoPriv, noGroupName, noSuchContext, noSuchView, notInView, pduGetBulkRequestPdu, pduGetNextRequestPdu, pduGetRequestPdu, pduGetResponsePdu, pduInformRequestPdu, pduReportPdu, pduSetRequestPdu, pduV1TrapPdu, pduV2TrapPdu, pduWalkRequest, privMask, reportableFlag, snmpAuthNotSupported, snmpBadSecurityLevel, snmpPrivNotSupported, snmpReqAborted, snmpReqEncodingError, snmpReqHandleTooBig, snmpReqInternalError, snmpReqPacketOverflow, snmpReqRefireAfterVbFix, snmpReqSocketIOError, snmpReqTimeout, snmpReqTooBigImpossible, snmpReqUnknownError, snmpRspAuthorizationError, snmpRspBadValue, snmpRspCommitFailed, snmpRspDecodingError, snmpRspEndOfTable, snmpRspGenErr, snmpRspInconsistentName, snmpRspInconsistentValue, snmpRspNoAccess, snmpRspNoCreation, snmpRspNoError, snmpRspNoSuchName, snmpRspNotWritable, snmpRspReadOnly, snmpRspResourceUnavailable, snmpRspTooBig, snmpRspUndoFailed, snmpRspWrongEncoding, snmpRspWrongLength, snmpRspWrongType, snmpRspWrongValue, snmpUnknownPrincipal, snmpUsmBadEngineId, snmpUsmInvalidTimeliness, snmpUsmSecurityModel, snmpV1AccessControlModel, snmpV1MsgProcessingModel, snmpV1SecurityModel, snmpV2AccessControlModel, snmpV2MsgProcessingModel, snmpV2SecurityModel, snmpV3AccessControlModel, snmpV3MsgProcessingModel, snmpVersionOne, snmpVersionThree, snmpVersionTwo, snmpWrongSnmpVersion, trapAuthenticationFailure, trapColdStart, trapEgpNeighborLoss, trapEnterpriseSpecific, trapLinkDown, trapLinkUp, trapWarmStart
 
Constructor Summary
SnmpStatusException(int status)
          Constructs a new SnmpStatusException with the specified status error.
SnmpStatusException(int status, int index)
          Constructs a new SnmpStatusException with the specified status error and status index.
SnmpStatusException(SnmpStatusException x, int index)
          Constructs a new SnmpStatusException with an error index.
SnmpStatusException(String s)
          Constructs a new SnmpStatusException with an error message.
 
Method Summary
 int getErrorIndex()
          Returns the index of the error.
 int getStatus()
          Return the error status.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

noSuchName

public static final int noSuchName
Error code as defined in RFC 1448 for: noSuchName.

See Also:
Constant Field Values

badValue

public static final int badValue
Error code as defined in RFC 1448 for: badValue.

See Also:
Constant Field Values

readOnly

public static final int readOnly
Error code as defined in RFC 1448 for: readOnly.

See Also:
Constant Field Values

noAccess

public static final int noAccess
Error code as defined in RFC 1448 for: noAccess.

See Also:
Constant Field Values

noSuchInstance

public static final int noSuchInstance
Error code for reporting a no such instance error.

See Also:
Constant Field Values

noSuchObject

public static final int noSuchObject
Error code for reporting a no such object error.

See Also:
Constant Field Values
Constructor Detail

SnmpStatusException

public SnmpStatusException(int status)
Constructs a new SnmpStatusException with the specified status error.

Parameters:
status - The error status.

SnmpStatusException

public SnmpStatusException(int status,
                           int index)
Constructs a new SnmpStatusException with the specified status error and status index.

Parameters:
status - The error status.
index - The error index.

SnmpStatusException

public SnmpStatusException(String s)
Constructs a new SnmpStatusException with an error message. The error status is set to 0 (noError) and the index to -1.

Parameters:
s - The error message.

SnmpStatusException

public SnmpStatusException(SnmpStatusException x,
                           int index)
Constructs a new SnmpStatusException with an error index.

Parameters:
x - The original SnmpStatusException.
index - The error index.
Method Detail

getStatus

public int getStatus()
Return the error status.

Returns:
The error status.

getErrorIndex

public int getErrorIndex()
Returns the index of the error. A value of -1 means that the index is not known/applicable.

Returns:
The error index.

Open Source build 02
opendmk-1.0-b02 2007.10.01_19:17:46_MEST

Copyright 1998-2007 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.