public class MessageException
extends java.io.IOException
MessageException
represents information about an exception
occurred during message processing. The associated
StatusInformation
object provides (if present) detailed
information about the error that occurred and the status of the processed
message.Modifier and Type | Field and Description |
---|---|
private static long |
serialVersionUID |
private int |
snmp4jErrorStatus |
private StatusInformation |
statusInformation |
Constructor and Description |
---|
MessageException() |
MessageException(StatusInformation status)
Creates a
MessageException from a
StatusInformation object. |
MessageException(java.lang.String message) |
MessageException(java.lang.String message,
int snmp4jErrorStatus)
Creates a
MessageException with error message and
SNMP4J specific error status (see getSnmp4jErrorStatus()
for details. |
MessageException(java.lang.String message,
int snmp4jErrorStatus,
java.lang.Throwable rootCause)
Creates a
MessageException with error message and
SNMP4J specific error status (see getSnmp4jErrorStatus()
for details. |
Modifier and Type | Method and Description |
---|---|
int |
getSnmp4jErrorStatus()
Gets the SNMP4J specific error status associated with this exception.
|
StatusInformation |
getStatusInformation() |
void |
setStatusInformation(StatusInformation statusInformation) |
private static final long serialVersionUID
private StatusInformation statusInformation
private int snmp4jErrorStatus
public MessageException()
public MessageException(StatusInformation status)
MessageException
from a
StatusInformation
object.status
- a StatusInformation
instance.public MessageException(java.lang.String message)
public MessageException(java.lang.String message, int snmp4jErrorStatus)
MessageException
with error message and
SNMP4J specific error status (see getSnmp4jErrorStatus()
for details.message
- an error message.snmp4jErrorStatus
- a MessageProcessingModel
or SecurityModel
specific error status as defined by SnmpConstants
.public MessageException(java.lang.String message, int snmp4jErrorStatus, java.lang.Throwable rootCause)
MessageException
with error message and
SNMP4J specific error status (see getSnmp4jErrorStatus()
for details.message
- an error message.snmp4jErrorStatus
- a MessageProcessingModel
or SecurityModel
specific error status as defined by SnmpConstants
.rootCause
- the root cause represented by a Throwable.public StatusInformation getStatusInformation()
public void setStatusInformation(StatusInformation statusInformation)
public int getSnmp4jErrorStatus()
MessageProcessingModel
or SecurityModel
specific error status as defined by SnmpConstants
.