KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > osgi > service > runnable > ApplicationLauncher


1 /*******************************************************************************
2  * Copyright (c) 2005 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
12 package org.eclipse.osgi.service.runnable;
13
14 /**
15  * An ApplicationLauncher is used to launch ParameterizedRunnable objects using
16  * the main thread.
17  * <p>
18  * This interface is not intended to be implemented by clients.
19  * </p>
20  *
21  * @since 3.2
22  */

23 public interface ApplicationLauncher {
24     /**
25      * Launches the specified runnable using the main thread.
26      * @param runnable a ParameterizedRunnalbe to run on the main thread.
27      * @param context the context to launch the runnable with
28      */

29     void launch(ParameterizedRunnable runnable, Object JavaDoc context);
30
31     /**
32      * Forces the current runnable which is running to be stopped.
33      * This method will return after the currently running ParameterizedRunnable
34      * has completely stopped.
35      * <p>
36      * After this method returns this ApplicationLauncher will no longer allow
37      * applications to be launched.
38      */

39     void shutdown();
40 }
41
Popular Tags