- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.io.IOException
-
- org.snmp4j.MessageException
-
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
UnsupportedAddressClassException
public class MessageException extends IOException
TheMessageException
represents information about an exception occurred during message processing. The associatedStatusInformation
object provides (if present) detailed information about the error that occurred and the status of the processed message.- Version:
- 1.0.1
- Author:
- Frank Fock
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description MessageException()
MessageException(String message)
MessageException(String message, int snmp4jErrorStatus)
Creates aMessageException
with error message and SNMP4J specific error status (seegetSnmp4jErrorStatus()
for details.MessageException(String message, int snmp4jErrorStatus, Throwable rootCause)
Creates aMessageException
with error message and SNMP4J specific error status (seegetSnmp4jErrorStatus()
for details.MessageException(StatusInformation status)
Creates aMessageException
from aStatusInformation
object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getSnmp4jErrorStatus()
Gets the SNMP4J specific error status associated with this exception.StatusInformation
getStatusInformation()
void
setStatusInformation(StatusInformation statusInformation)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-
-
-
Constructor Detail
-
MessageException
public MessageException()
-
MessageException
public MessageException(StatusInformation status)
Creates aMessageException
from aStatusInformation
object.- Parameters:
status
- aStatusInformation
instance.
-
MessageException
public MessageException(String message)
-
MessageException
public MessageException(String message, int snmp4jErrorStatus)
Creates aMessageException
with error message and SNMP4J specific error status (seegetSnmp4jErrorStatus()
for details.- Parameters:
message
- an error message.snmp4jErrorStatus
- aMessageProcessingModel
orSecurityModel
specific error status as defined bySnmpConstants
.- Since:
- 2.2
-
MessageException
public MessageException(String message, int snmp4jErrorStatus, Throwable rootCause)
Creates aMessageException
with error message and SNMP4J specific error status (seegetSnmp4jErrorStatus()
for details.- Parameters:
message
- an error message.snmp4jErrorStatus
- aMessageProcessingModel
orSecurityModel
specific error status as defined bySnmpConstants
.rootCause
- the root cause represented by a Throwable.- Since:
- 2.2.6
-
-
Method Detail
-
getStatusInformation
public StatusInformation getStatusInformation()
-
setStatusInformation
public void setStatusInformation(StatusInformation statusInformation)
-
getSnmp4jErrorStatus
public int getSnmp4jErrorStatus()
Gets the SNMP4J specific error status associated with this exception.- Returns:
- a
MessageProcessingModel
orSecurityModel
specific error status as defined bySnmpConstants
. - Since:
- 2.2
-
-