javax.security.sasl
Class SaslException

java.lang.Object sample code for java.lang.Object definition code for java.lang.Object 
  extended by java.lang.Throwable sample code for java.lang.Throwable definition code for java.lang.Throwable 
      extended by java.lang.Exception sample code for java.lang.Exception definition code for java.lang.Exception 
          extended by java.io.IOException sample code for java.io.IOException definition code for java.io.IOException 
              extended by javax.security.sasl.SaslException
All Implemented Interfaces:
Serializable sample code for java.io.Serializable definition code for java.io.Serializable
Direct Known Subclasses:
AuthenticationException sample code for javax.security.sasl.AuthenticationException definition code for javax.security.sasl.AuthenticationException

public class SaslException
extends IOException sample code for java.io.IOException definition code for java.io.IOException

This class represents an error that has occurred when using SASL.

Since:
1.5
See Also:
Serialized Form

Constructor Summary
SaslException sample code for javax.security.sasl.SaslException.SaslException() definition code for javax.security.sasl.SaslException.SaslException() ()
          Constructs a new instance of SaslException.
SaslException sample code for javax.security.sasl.SaslException.SaslException(java.lang.String) definition code for javax.security.sasl.SaslException.SaslException(java.lang.String) (String sample code for java.lang.String definition code for java.lang.String  detail)
          Constructs a new instance of SaslException with a detailed message.
SaslException sample code for javax.security.sasl.SaslException.SaslException(java.lang.String, java.lang.Throwable) definition code for javax.security.sasl.SaslException.SaslException(java.lang.String, java.lang.Throwable) (String sample code for java.lang.String definition code for java.lang.String  detail, Throwable sample code for java.lang.Throwable definition code for java.lang.Throwable  ex)
          Constructs a new instance of SaslException with a detailed message and a root exception.
 
Method Summary
 Throwable sample code for java.lang.Throwable definition code for java.lang.Throwable getCause sample code for javax.security.sasl.SaslException.getCause() definition code for javax.security.sasl.SaslException.getCause() ()
          Returns the cause of this throwable or null if the cause is nonexistent or unknown.
 Throwable sample code for java.lang.Throwable definition code for java.lang.Throwable initCause sample code for javax.security.sasl.SaslException.initCause(java.lang.Throwable) definition code for javax.security.sasl.SaslException.initCause(java.lang.Throwable) (Throwable sample code for java.lang.Throwable definition code for java.lang.Throwable  cause)
          Initializes the cause of this throwable to the specified value.
 String sample code for java.lang.String definition code for java.lang.String toString sample code for javax.security.sasl.SaslException.toString() definition code for javax.security.sasl.SaslException.toString() ()
          Returns the string representation of this exception.
 
Methods inherited from class java.lang.Throwable sample code for java.lang.Throwable definition code for java.lang.Throwable
fillInStackTrace sample code for java.lang.Throwable.fillInStackTrace() definition code for java.lang.Throwable.fillInStackTrace() , getLocalizedMessage sample code for java.lang.Throwable.getLocalizedMessage() definition code for java.lang.Throwable.getLocalizedMessage() , getMessage sample code for java.lang.Throwable.getMessage() definition code for java.lang.Throwable.getMessage() , getStackTrace sample code for java.lang.Throwable.getStackTrace() definition code for java.lang.Throwable.getStackTrace() , printStackTrace sample code for java.lang.Throwable.printStackTrace() definition code for java.lang.Throwable.printStackTrace() , printStackTrace sample code for java.lang.Throwable.printStackTrace(java.io.PrintStream) definition code for java.lang.Throwable.printStackTrace(java.io.PrintStream) , printStackTrace sample code for java.lang.Throwable.printStackTrace(java.io.PrintWriter) definition code for java.lang.Throwable.printStackTrace(java.io.PrintWriter) , setStackTrace sample code for java.lang.Throwable.setStackTrace(java.lang.StackTraceElement[]) definition code for java.lang.Throwable.setStackTrace(java.lang.StackTraceElement[])
 
Methods inherited from class java.lang.Object sample code for java.lang.Object definition code for java.lang.Object
clone sample code for java.lang.Object.clone() definition code for java.lang.Object.clone() , equals sample code for java.lang.Object.equals(java.lang.Object) definition code for java.lang.Object.equals(java.lang.Object) , finalize sample code for java.lang.Object.finalize() definition code for java.lang.Object.finalize() , getClass sample code for java.lang.Object.getClass() definition code for java.lang.Object.getClass() , hashCode sample code for java.lang.Object.hashCode() definition code for java.lang.Object.hashCode() , notify sample code for java.lang.Object.notify() definition code for java.lang.Object.notify() , notifyAll sample code for java.lang.Object.notifyAll() definition code for java.lang.Object.notifyAll() , wait sample code for java.lang.Object.wait() definition code for java.lang.Object.wait() , wait sample code for java.lang.Object.wait(long) definition code for java.lang.Object.wait(long) , wait sample code for java.lang.Object.wait(long, int) definition code for java.lang.Object.wait(long, int)
 

Constructor Detail

SaslException sample code for javax.security.sasl.SaslException() definition code for javax.security.sasl.SaslException()

public SaslException()
Constructs a new instance of SaslException. The root exception and the detailed message are null.


SaslException sample code for javax.security.sasl.SaslException(java.lang.String) definition code for javax.security.sasl.SaslException(java.lang.String)

public SaslException(String sample code for java.lang.String definition code for java.lang.String  detail)
Constructs a new instance of SaslException with a detailed message. The root exception is null.

Parameters:
detail - A possibly null string containing details of the exception.
See Also:
Throwable.getMessage() sample code for java.lang.Throwable.getMessage() definition code for java.lang.Throwable.getMessage()

SaslException sample code for javax.security.sasl.SaslException(java.lang.String, java.lang.Throwable) definition code for javax.security.sasl.SaslException(java.lang.String, java.lang.Throwable)

public SaslException(String sample code for java.lang.String definition code for java.lang.String  detail,
                     Throwable sample code for java.lang.Throwable definition code for java.lang.Throwable  ex)
Constructs a new instance of SaslException with a detailed message and a root exception. For example, a SaslException might result from a problem with the callback handler, which might throw a NoSuchCallbackException if it does not support the requested callback, or throw an IOException if it had problems obtaining data for the callback. The SaslException's root exception would be then be the exception thrown by the callback handler.

Parameters:
detail - A possibly null string containing details of the exception.
ex - A possibly null root exception that caused this exception.
See Also:
Throwable.getMessage() sample code for java.lang.Throwable.getMessage() definition code for java.lang.Throwable.getMessage() , getCause() sample code for javax.security.sasl.SaslException.getCause() definition code for javax.security.sasl.SaslException.getCause()
Method Detail

getCause sample code for javax.security.sasl.SaslException.getCause() definition code for javax.security.sasl.SaslException.getCause()

public Throwable sample code for java.lang.Throwable definition code for java.lang.Throwable  getCause()
Description copied from class: Throwable sample code for java.lang.Throwable.getCause() definition code for java.lang.Throwable.getCause()
Returns the cause of this throwable or null if the cause is nonexistent or unknown. (The cause is the throwable that caused this throwable to get thrown.)

This implementation returns the cause that was supplied via one of the constructors requiring a Throwable, or that was set after creation with the Throwable.initCause(Throwable) sample code for java.lang.Throwable.initCause(java.lang.Throwable) definition code for java.lang.Throwable.initCause(java.lang.Throwable) method. While it is typically unnecessary to override this method, a subclass can override it to return a cause set by some other means. This is appropriate for a "legacy chained throwable" that predates the addition of chained exceptions to Throwable. Note that it is not necessary to override any of the PrintStackTrace methods, all of which invoke the getCause method to determine the cause of a throwable.

Overrides:
getCause sample code for java.lang.Throwable.getCause() definition code for java.lang.Throwable.getCause() in class Throwable sample code for java.lang.Throwable definition code for java.lang.Throwable
Returns:
the cause of this throwable or null if the cause is nonexistent or unknown.

initCause sample code for javax.security.sasl.SaslException.initCause(java.lang.Throwable) definition code for javax.security.sasl.SaslException.initCause(java.lang.Throwable)

public Throwable sample code for java.lang.Throwable definition code for java.lang.Throwable  initCause(Throwable sample code for java.lang.Throwable definition code for java.lang.Throwable  cause)
Description copied from class: Throwable sample code for java.lang.Throwable.initCause(java.lang.Throwable) definition code for java.lang.Throwable.initCause(java.lang.Throwable)
Initializes the cause of this throwable to the specified value. (The cause is the throwable that caused this throwable to get thrown.)

This method can be called at most once. It is generally called from within the constructor, or immediately after creating the throwable. If this throwable was created with Throwable.Throwable(Throwable) sample code for java.lang.Throwable.Throwable(java.lang.Throwable) definition code for java.lang.Throwable.Throwable(java.lang.Throwable) or Throwable.Throwable(String,Throwable) sample code for java.lang.Throwable.Throwable(java.lang.String, java.lang.Throwable) definition code for java.lang.Throwable.Throwable(java.lang.String, java.lang.Throwable) , this method cannot be called even once.

Overrides:
initCause sample code for java.lang.Throwable.initCause(java.lang.Throwable) definition code for java.lang.Throwable.initCause(java.lang.Throwable) in class Throwable sample code for java.lang.Throwable definition code for java.lang.Throwable
Parameters:
cause - the cause (which is saved for later retrieval by the Throwable.getCause() sample code for java.lang.Throwable.getCause() definition code for java.lang.Throwable.getCause() method). (A null value is permitted, and indicates that the cause is nonexistent or unknown.)
Returns:
a reference to this Throwable instance.

toString sample code for javax.security.sasl.SaslException.toString() definition code for javax.security.sasl.SaslException.toString()

public String sample code for java.lang.String definition code for java.lang.String  toString()
Returns the string representation of this exception. The string representation contains this exception's class name, its detailed messsage, and if it has a root exception, the string representation of the root exception. This string representation is meant for debugging and not meant to be interpreted programmatically.

Overrides:
toString sample code for java.lang.Throwable.toString() definition code for java.lang.Throwable.toString() in class Throwable sample code for java.lang.Throwable definition code for java.lang.Throwable
Returns:
The non-null string representation of this exception.
See Also:
Throwable.getMessage() sample code for java.lang.Throwable.getMessage() definition code for java.lang.Throwable.getMessage()