- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.io.IOException
-
- org.snmp4j.MessageException
-
- All Implemented Interfaces:
java.io.Serializable
- Direct Known Subclasses:
UnsupportedAddressClassException
public class MessageException extends java.io.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
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private static long
serialVersionUID
private int
snmp4jErrorStatus
private StatusInformation
statusInformation
-
Constructor Summary
Constructors Constructor Description MessageException()
MessageException(java.lang.String message)
MessageException(java.lang.String message, int snmp4jErrorStatus)
Creates aMessageException
with error message and SNMP4J specific error status (seegetSnmp4jErrorStatus()
for details.MessageException(java.lang.String message, int snmp4jErrorStatus, java.lang.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)
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
statusInformation
private StatusInformation statusInformation
-
snmp4jErrorStatus
private int snmp4jErrorStatus
-
-
Constructor Detail
-
MessageException
public MessageException()
-
MessageException
public MessageException(StatusInformation status)
Creates aMessageException
from aStatusInformation
object.- Parameters:
status
- aStatusInformation
instance.
-
MessageException
public MessageException(java.lang.String message)
-
MessageException
public MessageException(java.lang.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(java.lang.String message, int snmp4jErrorStatus, java.lang.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
-
-