com.ibm.websphere.security
Class WSSecurityException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.security.GeneralSecurityException
                    |
                    +--com.ibm.websphere.security.WSSecurityException
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
AuthenticationFailedException, AuthenticationNotSupportedException, CertificateMapFailedException, CertificateMapNotSupportedException, CredentialDestroyedException, CustomRegistryException, EntryNotFoundException, InvalidTokenException, MapCredentialFailedException, MapCredentialNotSupportedException, NotImplementedException, PasswordCheckFailedException, TokenCreationFailedException, TokenExpiredException, UnsupportedRealmException, ValidationFailedException, ValidationNotSupportedException, WSSecurityContextException

public class WSSecurityException
extends java.security.GeneralSecurityException
implements java.io.Serializable

This exception is a generic WebSphere Security exception. Most other WebSphere security exceptions extend this one.

Version:
1.0
See Also:
Serialized Form

Constructor Summary
WSSecurityException()
           A default constructor.
WSSecurityException(java.lang.String str)
           A constructor that accepts an error message.
WSSecurityException(java.lang.String str, java.lang.Throwable t)
           A constructor accepts an error message and original exception.
WSSecurityException(java.lang.Throwable t)
           A constructor that accepts a Throwable.
 
Method Summary
 void addException(java.lang.Throwable t)
           Add an exception that will be stored in an ArrayList.
 java.lang.Throwable getCause()
          Returns the root cause exception.
 java.util.ArrayList getExceptions()
           Returns an ArrayList of exceptions that have been added to this exception.
 void printStackTrace()
           Formats and prints all the exceptions added to the ArrayList using the addException API.
 void printStackTrace(java.io.PrintStream s)
           Formats and prints all the exceptions added to the ArrayList using the addException API.
 void printStackTrace(java.io.PrintWriter s)
           Formats and prints all the exceptions added to the ArrayList using the addException API.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

WSSecurityException

public WSSecurityException()

A default constructor.


WSSecurityException

public WSSecurityException(java.lang.String str)

A constructor that accepts an error message. The error message can be retrieved using the getMessage() API.

Parameters:
str - An error message.

WSSecurityException

public WSSecurityException(java.lang.Throwable t)

A constructor that accepts a Throwable. The Throwable can be retrieved using the getExceptions() or getCause() API.

Parameters:
str - An error message.

WSSecurityException

public WSSecurityException(java.lang.String str,
                           java.lang.Throwable t)

A constructor accepts an error message and original exception. The exception will be added to an ArrayList and other exceptions may be added along the way. The error message can be retrieved using the getMessage() API.

Parameters:
str - An error message.
t - Any exception type that extends Throwable.
Method Detail

addException

public void addException(java.lang.Throwable t)

Add an exception that will be stored in an ArrayList. The method getExceptions can return all the exceptions added via addException. You may also add an exception via the constructor. Use of this API allows exceptions to be propogated back to the originating caller.

Parameters:
t - Any exception type that extends Throwable

getCause

public java.lang.Throwable getCause()
Returns the root cause exception.
Returns:
The Throwable root cause exception.

getExceptions

public java.util.ArrayList getExceptions()

Returns an ArrayList of exceptions that have been added to this exception.

Parameters:
t - Any exception type that extends Throwable

printStackTrace

public void printStackTrace()

Formats and prints all the exceptions added to the ArrayList using the addException API. The output will be printed to System error.

Overrides:
printStackTrace in class java.lang.Throwable

printStackTrace

public void printStackTrace(java.io.PrintStream s)

Formats and prints all the exceptions added to the ArrayList using the addException API. The output will be printed to the PrintStream passed in.

Overrides:
printStackTrace in class java.lang.Throwable
Parameters:
s - A PrintStream which the exception output will be printed to.

printStackTrace

public void printStackTrace(java.io.PrintWriter s)

Formats and prints all the exceptions added to the ArrayList using the addException API. The output will be printed to the PrintWriter passed in.

Overrides:
printStackTrace in class java.lang.Throwable
Parameters:
s - A PrintWriter which the exception output will be printed to.