KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > java > plugin > boot > BootErrorHandler


1 /*****************************************************************************
2  * Java Plug-in Framework (JPF)
3  * Copyright (C) 2004-2005 Dmitry Olshansky
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2.1 of the License, or (at your option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  * Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public
16  * License along with this library; if not, write to the Free Software
17  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18  *****************************************************************************/

19 package org.java.plugin.boot;
20
21 import org.java.plugin.registry.IntegrityCheckReport;
22
23 /**
24  * Callback interface to handle boot-time application errors.
25  *
26  * @version $Id: BootErrorHandler.java,v 1.1 2005/10/22 15:22:24 ddimon Exp $
27  */

28 public interface BootErrorHandler {
29     /**
30      * Called if fatal error has occurred.
31      * @param message error message
32      */

33     void handleFatalError(String JavaDoc message);
34     
35     /**
36      * Called if fatal error has occurred.
37      * @param message error message
38      * @param t an error
39      */

40     void handleFatalError(String JavaDoc message, Throwable JavaDoc t);
41
42     /**
43      * Called if non-fatal error has occurred and application boot may be
44      * continued.
45      * @param message error message
46      * @param e an error
47      * @return <code>true</code> if user wish to continue application start
48      */

49     boolean handleError(String JavaDoc message, Exception JavaDoc e);
50     
51     /**
52      * Called if an error has been detected during plug-ins integrity check and
53      * application boot may be continued.
54      * @param message error message
55      * @param integrityCheckReport integrity check report
56      * @return <code>true</code> if user wish to continue application start
57      */

58     boolean handleError(String JavaDoc message,
59             IntegrityCheckReport integrityCheckReport);
60 }
61
Popular Tags