Package org.glassfish.admin.amx.util
Class ThrowableMapper
- java.lang.Object
-
- org.glassfish.admin.amx.util.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.
-
-
Constructor Summary
Constructors Constructor Description ThrowableMapper(Throwable t)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Throwable
map()
Map the original Throwable to one that is non-proprietary (standard).static Throwable
map(Throwable t)
-
-
-
Constructor Detail
-
ThrowableMapper
public ThrowableMapper(Throwable t)
-
-
Method Detail
-
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
-
-