|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--org.sape.carbon.core.exception.DefaultExceptionDelegateImpl
This is the default implementation of the exception delegate interface to support basic exception handling as well as auto-logging of the exception.
Copyright 2002 Sapient
| Field Summary | |
private Throwable |
cause
The cause or previous exception of this exception. |
private Throwable |
delegatee
The exception object that this object is acting as the delegate for. |
private Class |
exceptionSource
The source indicates the class and optionally the method from which this exception originated. |
private String |
message
The string message for this exception. |
private SeverityEnum |
severity
The severity of this exception (how bad it was). |
| Constructor Summary | |
DefaultExceptionDelegateImpl()
Default public constructor. |
|
| Method Summary | |
Throwable |
getCause()
Gets the previousException |
String |
getClassName()
Returns the class name of the underlying exception. |
Throwable |
getDelegatee()
Gets the deleagatee |
Class |
getExceptionSource()
Returns the producerId of the underlying exception. |
String |
getMessage()
calls toString |
SeverityEnum |
getSeverity()
Returns te severity of the underlying exception. |
void |
handleException()
This implementations handles the exception by logging its stack trace printout to the static logging service. |
void |
setCause(Throwable cause)
Sets the causal or previous exception of the current exception being handled by this delegate. |
void |
setDelegatee(Throwable delegatee)
Sets the throwable which is requesting the creation of this delegate. |
void |
setExceptionSource(Class exceptionSource)
This is the class and method from which this exception eminates. |
void |
setMessage(String message)
Sets the string explanation of this exception |
void |
setSeverity(SeverityEnum severity)
Sets the severity of the exception. |
String |
toString()
This method builds a recursive view of this exception and its message as well as its cause or previous exception and so on. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
private Throwable delegatee
private String message
private Throwable cause
private Class exceptionSource
private SeverityEnum severity
| Constructor Detail |
public DefaultExceptionDelegateImpl()
| Method Detail |
public void handleException()
handleException in interface ExceptionDelegatepublic Throwable getCause()
getCause in interface ExceptionDelegatepublic SeverityEnum getSeverity()
getSeverity in interface ExceptionDelegatepublic Class getExceptionSource()
getExceptionSource in interface ExceptionDelegatepublic String getClassName()
public String getMessage()
getMessage in interface ExceptionDelegatepublic Throwable getDelegatee()
getDelegatee in interface ExceptionDelegatepublic void setCause(Throwable cause)
setCause in interface ExceptionDelegatecause - The causal or previous exceptionpublic void setDelegatee(Throwable delegatee)
setDelegatee in interface ExceptionDelegatedelegatee - the delegatee this delegate is working forpublic void setMessage(String message)
setMessage in interface ExceptionDelegatemessage - The string explanation of this exceptionpublic void setSeverity(SeverityEnum severity)
setSeverity in interface ExceptionDelegateseverity - the Severity of the exceptionpublic void setExceptionSource(Class exceptionSource)
setExceptionSource in interface ExceptionDelegateexceptionSource - the class and method of this exceptionpublic String toString()
toString in class Object
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||