-
- All Implemented Interfaces:
-
java.io.Serializable
public class StunException extends Exception
A StunException is thrown when a general STUN exception is encountered.
-
-
Field Summary
Fields Modifier and Type Field Description public final static intUNKNOWN_ERRORpublic final static intILLEGAL_STATEpublic final static intILLEGAL_ARGUMENTpublic final static intINTERNAL_ERRORpublic final static intTRANSACTION_DOES_NOT_EXISTpublic final static intNETWORK_ERRORpublic final static intTRANSACTION_ALREADY_ANSWEREDprivate intid
-
Constructor Summary
Constructors Constructor Description StunException()Creates a StunException. StunException(int id)Creates a StunException setting id as its identifier. StunException(String message)Creates a StunException, setting an error message. StunException(int id, String message)Creates a StunException, setting an error message and an error id. StunException(int id, String message, Throwable cause)Creates a StunException, setting an error message an error id and a cause. StunException(String message, Throwable cause)Creates a StunException, setting an error message and a cause object. StunException(Throwable cause)Creates an exception, setting the Throwable object, that caused it.
-
Method Summary
Modifier and Type Method Description intgetID()Returns this exception's identifier. voidsetID(int id)Sets the identifier of the error that caused the exception. -
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, setStackTrace, toString -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
StunException
StunException()
Creates a StunException.
-
StunException
StunException(int id)
Creates a StunException setting id as its identifier.- Parameters:
id- an error ID
-
StunException
StunException(String message)
Creates a StunException, setting an error message.- Parameters:
message- an error message.
-
StunException
StunException(int id, String message)
Creates a StunException, setting an error message and an error id.- Parameters:
id- an error id.message- an error message.
-
StunException
StunException(int id, String message, Throwable cause)
Creates a StunException, setting an error message an error id and a cause.- Parameters:
id- an error id.message- an error message.cause- the error that caused this exception.
-
StunException
StunException(String message, Throwable cause)
Creates a StunException, setting an error message and a cause object.- Parameters:
message- an error message.cause- the error object that caused this exception.
-
StunException
StunException(Throwable cause)
Creates an exception, setting the Throwable object, that caused it.- Parameters:
cause- the error that caused this exception.
-
-
-
-