|
IBM WebSphere Application ServerTM Release 8 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.Throwable
java.lang.Exception
com.ibm.websphere.exception.DistributedException
public class DistributedException
Provides exception functions desirable in a distributed environment. This includes the following:
Constructor Summary | |
---|---|
DistributedException()
Default constructor. |
|
DistributedException(java.lang.String message)
Constructor with a message. |
|
DistributedException(java.lang.String resourceBundleName,
java.lang.String resourceKey,
java.lang.Object[] formatArguments,
java.lang.String defaultText)
Constructor with localization message information. |
|
DistributedException(java.lang.String resourceBundleName,
java.lang.String resourceKey,
java.lang.Object[] formatArguments,
java.lang.String defaultText,
java.lang.Throwable exception)
Constructor with localization message information and an exception to be chained. |
|
DistributedException(java.lang.String message,
java.lang.Throwable exception)
Constructor with a message and an exception to be chained. |
|
DistributedException(java.lang.Throwable exception)
Constructor with an exception to be chained. |
Method Summary | |
---|---|
java.lang.Throwable |
getException(java.lang.String exceptionClassName)
Get a specific exception in a possible chain of exceptions. |
DistributedExceptionInfo |
getExceptionInfo()
Retrieve the DistributedExceptionInfo object. |
java.lang.String |
getMessage()
Retrieve the text message for this exception. |
java.lang.Throwable |
getOriginalException()
Get the original exception in a possible chain of exceptions. |
java.lang.Throwable |
getPreviousException()
Get the previous exception. |
void |
printStackTrace()
Print the exception execution stack. |
void |
printStackTrace(java.io.PrintStream ps)
Print the exception execution stack. |
void |
printStackTrace(java.io.PrintWriter pw)
Print the exception execution stack to a print writer. |
void |
printSuperStackTrace(java.io.PrintStream ps)
This method is used to get the stack trace of the current exception. |
void |
printSuperStackTrace(java.io.PrintWriter pw)
This method is used to get the stack trace of the current exception. |
void |
setDefaultMessage(java.lang.String defaultText)
Set the default message for this message. |
void |
setLocalizationInfo(java.lang.String resourceBundleName,
java.lang.String resourceKey,
java.lang.Object[] formatArguments)
Set the values to be used for finding the correct translated version of the message and formatting it. |
Methods inherited from class java.lang.Throwable |
---|
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, setStackTrace, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public DistributedException()
public DistributedException(java.lang.String message)
message
- java.lang.String Message textpublic DistributedException(java.lang.String resourceBundleName, java.lang.String resourceKey, java.lang.Object[] formatArguments, java.lang.String defaultText)
resourceBundleName
- java.lang.String The name of resource bundle
that will be used to retrieve the message for getMessage().resourceKey
- java.lang.String The key in the resource bundle that
will be used to select the specific message that is retrieved for
getMessage().formatArguments
- java.lang.Object[] The arguments to be passed to
the MessageFormat class to act as replacement variables in the message
that is retrieved from the resource bundle. Valid types are those supported
by MessageFormat.defaultText
- java.lang.String The default message that will be used in
getMessage() if the resource bundle or the key cannot be found.getMessage()
,
MessageFormat
public DistributedException(java.lang.String resourceBundleName, java.lang.String resourceKey, java.lang.Object[] formatArguments, java.lang.String defaultText, java.lang.Throwable exception)
resourceBundleName
- java.lang.String The name of resource bundle
that will be used to retrieve the message for getMessage().resourceKey
- java.lang.String The key in the resource bundle that
will be used to select the specific message that is retrieved for
getMessage().formatArguments
- java.lang.Object[] The arguments to be passed to
the MessageFormat class to act as replacement variables in the message
that is retrieved from the resource bundle. Valid types are those supported
by MessageFormat.defaultText
- java.lang.String The default message that will be used in
getMessage() if the resource bundle or the key cannot be found.exception
- java.lang.Throwable The exception that is to be chained.getMessage()
,
MessageFormat
public DistributedException(java.lang.String message, java.lang.Throwable exception)
message
- The message for this exceptionexception
- java.lang.Throwable The exception to be chainedpublic DistributedException(java.lang.Throwable exception)
exception
- java.lang.Throwable The exception to be chainedMethod Detail |
---|
public java.lang.Throwable getException(java.lang.String exceptionClassName) throws ExceptionInstantiationException
getException
in interface DistributedExceptionEnabled
String
- exceptionClassName the class name of the specific exception.
ExceptionInstantiationException
- An exception occurred while trying to instantiate the exception object.
If this exception is thrown, the relevant information can be retrieved
by using the getExceptionInfo() method followed by recursively using
the getPreviousExceptionInfo() method on the DistributedExceptionInfo
object.public DistributedExceptionInfo getExceptionInfo()
getExceptionInfo
in interface DistributedExceptionEnabled
public java.lang.String getMessage()
getMessage
in interface DistributedExceptionEnabled
getMessage
in class java.lang.Throwable
public java.lang.Throwable getOriginalException() throws ExceptionInstantiationException
getOriginalException
in interface DistributedExceptionEnabled
ExceptionInstantiationException
- An exception occurred while trying to instantiate the exception object.
If this exception is thrown, the relevant information can be retrieved
by using the getExceptionInfo() method followed by recursively using
the getPreviousExceptionInfo() method on the DistributedExceptionInfo
object.public java.lang.Throwable getPreviousException() throws ExceptionInstantiationException
getPreviousException
in interface DistributedExceptionEnabled
ExceptionInstantiationException
- An exception occurred while trying to instantiate the exception object.
If this exception is thrown, the relevant information can be retrieved
by using the getExceptionInfo() method.public void printStackTrace()
printStackTrace
in interface DistributedExceptionEnabled
printStackTrace
in class java.lang.Throwable
public void printStackTrace(java.io.PrintWriter pw)
printStackTrace
in interface DistributedExceptionEnabled
printStackTrace
in class java.lang.Throwable
pw
- java.io.PrintWriterpublic void printStackTrace(java.io.PrintStream ps)
printStackTrace
in class java.lang.Throwable
pw
- java.io.PrintStreampublic void printSuperStackTrace(java.io.PrintWriter pw)
printSuperStackTrace
in interface DistributedExceptionEnabled
param
- java.io.PrintWriterpublic void printSuperStackTrace(java.io.PrintStream ps)
param
- java.io.PrintStreampublic void setDefaultMessage(java.lang.String defaultText)
defaultText
- java.lang.Stringpublic void setLocalizationInfo(java.lang.String resourceBundleName, java.lang.String resourceKey, java.lang.Object[] formatArguments)
resourceBundleName
- java.lang.String - the name of the
resource bundle, which is a subclass of java.util.PropertyResourceBundle.resourceKey
- java.lang.String - the key in the resource bundle
that specifies the text for the exception messagearguments
- java.lang.Object[] -the arguments used to format the
message. Valid values are those that are
allowed for java.text.MessageFormat.format().MessageFormat
|
IBM WebSphere Application ServerTM Release 8 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |