KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > osgi > framework > adaptor > StatusException


1 /*******************************************************************************
2  * Copyright (c) 2006 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  *******************************************************************************/

11 package org.eclipse.osgi.framework.adaptor;
12
13 /**
14  * An exception my implement the StatusException interface to give more status information about the type of exception.
15  */

16 public interface StatusException {
17     /**
18      * The exception is ok and expected
19      */

20     public static final int CODE_OK = 0x01;
21     /**
22      * The exception is for informational purposes
23      */

24     public static final int CODE_INFO = 0x02;
25     /**
26      * The exception is unexpected by may be handled, but a warning should be logged
27      */

28     public static final int CODE_WARNING = 0x04;
29     /**
30      * The exception is unexpected and should result in an error.
31      */

32     public static final int CODE_ERROR = 0x08;
33     
34     /**
35      * Returns the status object
36      * @return the status object
37      */

38     public Object JavaDoc getStatus();
39
40     /**
41      * Returns the status code
42      * @return the status code
43      */

44     public int getStatusCode();
45 }
46
Popular Tags