- 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.IOExceptionTheMessageExceptionrepresents information about an exception occurred during message processing. The associatedStatusInformationobject 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(java.lang.String message)MessageException(java.lang.String message, int snmp4jErrorStatus)Creates aMessageExceptionwith error message and SNMP4J specific error status (seegetSnmp4jErrorStatus()for details.MessageException(java.lang.String message, int snmp4jErrorStatus, java.lang.Throwable rootCause)Creates aMessageExceptionwith error message and SNMP4J specific error status (seegetSnmp4jErrorStatus()for details.MessageException(StatusInformation status)Creates aMessageExceptionfrom aStatusInformationobject.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetSnmp4jErrorStatus()Gets the SNMP4J specific error status associated with this exception.StatusInformationgetStatusInformation()voidsetStatusInformation(StatusInformation statusInformation)
-
-
-
Constructor Detail
-
MessageException
public MessageException()
-
MessageException
public MessageException(StatusInformation status)
Creates aMessageExceptionfrom aStatusInformationobject.- Parameters:
status- aStatusInformationinstance.
-
MessageException
public MessageException(java.lang.String message)
-
MessageException
public MessageException(java.lang.String message, int snmp4jErrorStatus)Creates aMessageExceptionwith error message and SNMP4J specific error status (seegetSnmp4jErrorStatus()for details.- Parameters:
message- an error message.snmp4jErrorStatus- aMessageProcessingModelorSecurityModelspecific error status as defined bySnmpConstants.- Since:
- 2.2
-
MessageException
public MessageException(java.lang.String message, int snmp4jErrorStatus, java.lang.Throwable rootCause)Creates aMessageExceptionwith error message and SNMP4J specific error status (seegetSnmp4jErrorStatus()for details.- Parameters:
message- an error message.snmp4jErrorStatus- aMessageProcessingModelorSecurityModelspecific 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
MessageProcessingModelorSecurityModelspecific error status as defined bySnmpConstants. - Since:
- 2.2
-
-