com.sun.appserv.management.util.misc
Class ThrowableMapper
java.lang.Object
com.sun.appserv.management.util.misc.ThrowableMapper
public final class ThrowableMapper
- extends Object
Maps a Throwable to another one in order to avoid the transfer
of non-standard (proprietary) Exception types, which could result in
ClassNotFoundException on remote clients.
Any Throwable which either is, or contains,
a Throwable which is not in the allowed packages is converted.
Field Summary |
protected static Set<String> |
OK_PACKAGES
By default, any Throwable whose package does not start with one
of these packages must be mapped to something standard. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
OK_PACKAGES
protected static final Set<String> OK_PACKAGES
- By default, any Throwable whose package does not start with one
of these packages must be mapped to something standard.
ThrowableMapper
public ThrowableMapper(Throwable t)
map
public static Throwable map(Throwable t)
map
public Throwable map()
- Map the original Throwable to one that is non-proprietary (standard).
Possible results include java.lang.Exception, java.lang.RuntimeException,
java.lang.Error. The original stack trace and exception chain is
preserved, each element in that chain being mapped if necessary.
- Returns:
- a Throwable which uses only standard classes
Submit a bug or feature Copyright 2006 Sun Microsystems, Inc. All rights reserved.