net.sf.crispy
Class ExceptionWrapper
java.lang.Object
net.sf.crispy.ExceptionWrapper
- All Implemented Interfaces:
- java.io.Serializable
- public final class ExceptionWrapper
- extends java.lang.Object
- implements java.io.Serializable
Wraped the server side thrown exception. Transport to the client.
Unwraped the exception and thrown the exception on the client side.
- Since:
- 1.1.0
- Author:
- Linke
- See Also:
- Serialized Form
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ExceptionWrapper
public ExceptionWrapper()
ExceptionWrapper
public ExceptionWrapper(java.lang.Throwable pvThrowable)
ExceptionWrapper
public ExceptionWrapper(java.lang.Throwable pvThrowable,
boolean pvWithExceptionSerializer)
getWithExceptionSerializer
public boolean getWithExceptionSerializer()
setExceptionPlaceHolder
public void setExceptionPlaceHolder(java.lang.Object pvPlaceHolder)
getExceptionPlaceHolder
public java.lang.Object getExceptionPlaceHolder()
setMessage
public void setMessage(java.lang.String pvMessage)
getMessage
public java.lang.String getMessage()
setExceptionClassName
public void setExceptionClassName(java.lang.String pvExceptionClassName)
getExceptionClassName
public java.lang.String getExceptionClassName()
setStackTraceByteArray
public void setStackTraceByteArray(byte[] b)
getStackTraceByteArray
public byte[] getStackTraceByteArray()
getStackTraceElementWrapperList
public java.util.List getStackTraceElementWrapperList()
setStackTraceElementWrapperList
public void setStackTraceElementWrapperList(java.util.List pvStackTraceElementWrapperList)
copyStackTraceElement
public void copyStackTraceElement(java.lang.StackTraceElement[] pvStackTraceElements)
stackTrace2ByteArray
public void stackTrace2ByteArray(java.lang.Throwable pvThrowable)
printStackTrace2
public void printStackTrace2()
printStackTrace
public void printStackTrace()
printStackTrace
public void printStackTrace(java.io.OutputStream pvOutputStream)
newExceptionInstance
public java.lang.Exception newExceptionInstance()
isThrowableThanHandleThrowable
public static java.lang.Object isThrowableThanHandleThrowable(java.lang.Object pvResult)
- This method is used on the server side (from the invocation handler) to convert the
Exception
to the ExceptionWrapper
.
- Parameters:
pvResult
- Result of execution remote call (on the server side).
- Returns:
- The unchanged result object or if the result object is a Throwable,
than is the return value a ExceptionWrapper from the Throwable.
isResultExceptionThanThrowIt
public static java.lang.Object isResultExceptionThanThrowIt(java.lang.Object pvResult)
throws java.lang.Exception
- This method is calling from the client side procy (Executor or Static-Proxy).
It is converting from the
ExceptionWrapper
to the Exception
.
- Parameters:
pvResult
- Result of execution remote call (on the server side).
- Returns:
- The same result object (unchanged)
- Throws:
java.lang.Exception
- If the result is a map and in the map is a key: class and value
is equals ExceptionWrapper, than throw the server side created Exception.
Copyright © 2005-2006 Crispy. All Rights Reserved.