|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.bea.wli.config.component.WrappedThrowable
public class WrappedThrowable
Wraps an exception that was thrown on the server so that information about the exception can be obtained by any client without having to worry about whether the original exception is in the classpath of the caller. This is required if an exception thrown on the server is not necessarily on clients classpath. Such Throwables are wrapped by serializing them into a byte array so that they can be selectively deserialized on the client. If the deserialization of the original exception fails the client can ask for a simpler representation of the original exception that is guaranteed to be on clients classpath. This simple representation has stack trace and exception message of the original throwable.
This exception is also useful if the Exception is not serializable on the server as well. This
happens if the implementation of the exception does not obey the contract of the Serializable
interface and contains a non-serializable element.
Field Summary | |
---|---|
static long |
serialVersionUID
|
Constructor Summary | |
---|---|
WrappedThrowable(Throwable wrappedThrowable)
Constructor for wrapping a throwable. |
Method Summary | |
---|---|
static Throwable |
computeSimpleForm(Throwable t)
|
Throwable |
getOriginalForm()
Returns the original (wrapped) throwable. |
String |
getOriginalThrowableClassName()
Returns the class name of the wrapped Throwable. |
Throwable |
getSimpleForm()
Returns a simple representation of the original throwable. |
Throwable |
getThrowable()
Returns the original exception if it can be deserialized without errors and if it is not null. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final long serialVersionUID
Constructor Detail |
---|
public WrappedThrowable(Throwable wrappedThrowable)
wrappedThrowable
- the throwable to be wrappedMethod Detail |
---|
public static final Throwable computeSimpleForm(Throwable t)
public String getOriginalThrowableClassName()
getOriginalForm()
public Throwable getOriginalForm() throws IOException, ClassNotFoundException
getSimpleForm()
to get the alternative simpler representation
of this class if the original form could not be obtained due to an exception
null
if the original Throwable
could not be serialized due to some serialization error.
IOException
ClassNotFoundException
public Throwable getSimpleForm()
getOriginalForm()
has failed because the class of the original Throwable was
not on callers classpath.
public Throwable getThrowable()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |