KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > jface > util > ISafeRunnableRunner


1 /*******************************************************************************
2  * Copyright (c) 2005, 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  * Chris Gross (schtoo@schtoo.com) - initial API and implementation
10  * (bug 49497 [RCP] JFace dependency on org.eclipse.core.runtime enlarges standalone JFace applications)
11  *******************************************************************************/

12
13 package org.eclipse.jface.util;
14
15 import org.eclipse.core.runtime.ISafeRunnable;
16
17 /**
18  * Runs a safe runnables.
19  * <p>
20  * Clients may provide their own implementation to change
21  * how safe runnables are run from within JFace.
22  * </p>
23  *
24  * @see SafeRunnable#getRunner()
25  * @see SafeRunnable#setRunner(ISafeRunnableRunner)
26  * @see SafeRunnable#run(ISafeRunnable)
27  * @since 3.1
28  */

29 public interface ISafeRunnableRunner {
30     
31     /**
32      * Runs the runnable. All <code>ISafeRunnableRunners</code> must catch any exception
33      * thrown by the <code>ISafeRunnable</code> and pass the exception to
34      * <code>ISafeRunnable.handleException()</code>.
35      * @param code the code executed as a save runnable
36      *
37      * @see SafeRunnable#run(ISafeRunnable)
38      */

39     public abstract void run(ISafeRunnable code);
40     
41 }
42
Popular Tags