KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > sape > carbon > core > exception > Exceptionable


1 /*
2  * The contents of this file are subject to the Sapient Public License
3  * Version 1.0 (the "License"); you may not use this file except in compliance
4  * with the License. You may obtain a copy of the License at
5  * http://carbon.sf.net/License.html.
6  *
7  * Software distributed under the License is distributed on an "AS IS" basis,
8  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
9  * the specific language governing rights and limitations under the License.
10  *
11  * The Original Code is The Carbon Component Framework.
12  *
13  * The Initial Developer of the Original Code is Sapient Corporation
14  *
15  * Copyright (C) 2003 Sapient Corporation. All Rights Reserved.
16  */

17
18 package org.sape.carbon.core.exception;
19
20 import org.sape.carbon.core.util.classify.SeverityEnum;
21
22
23
24 /**
25  * <P>This is the standardized interface for throwables within the Carbon
26  * Component System. This interface specifically adds for the tracking
27  * of the Severity and Source of an exception in order to classify it within
28  * the logging system and the Cause or previous exception for supporting the
29  * pattern of Exception Levelization.</P>
30  *
31  * <P>The Exception Levelization pattern is designe to to create a common and
32  * consistent interface for a particular service as well as complete
33  * encapsulation of the implementation of that service.</P>
34  *
35  * Copyright 2002 Sapient
36  * @since carbon 1.0
37  * @author Greg Hinkle, January 2002
38  * @version $Revision: 1.8 $($Author: dvoet $ / $Date: 2003/05/05 21:21:21 $)
39  */

40 public interface Exceptionable {
41
42
43     /**
44      * Retrieves the previous exception.
45      * @return the causal or previous or nested exception for this exception
46      */

47     Throwable JavaDoc getCause();
48
49
50     /**
51      * Retrieves the severity of the current exception.
52      * @return the severity of the exception
53      */

54     SeverityEnum getSeverity();
55
56
57     /**
58      * Retrieves the source class and method of the exception.
59      * @return the source of this exception
60      */

61     Class JavaDoc getExceptionSource();
62
63 }
64
Popular Tags