KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > core > runtime > IPlatformRunnable


1 /*******************************************************************************
2  * Copyright (c) 2003, 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.core.runtime;
12
13 import org.eclipse.equinox.app.IApplication;
14
15 /**
16  * Bootstrap type for the platform. Platform runnables represent executable
17  * entry points into plug-ins. Runnables can be configured into the Platform's
18  * <code>org.eclipse.core.runtime.applications</code> extension-point
19  * or be made available through code or extensions on other plug-in's extension-points.
20  *
21  * <p>
22  * Clients may implement this interface.
23  * </p>
24  *
25  * @since 3.0
26  * @deprecated use {@link IApplication}
27  */

28 public interface IPlatformRunnable {
29
30     /**
31      * Exit object indicating normal termination
32      */

33     public static final Integer JavaDoc EXIT_OK = new Integer JavaDoc(0);
34
35     /**
36      * Exit object requesting platform restart
37      */

38     public static final Integer JavaDoc EXIT_RESTART = new Integer JavaDoc(23);
39
40     /**
41      * Exit object requesting that the command passed back be executed. Typically
42      * this is used to relaunch Eclipse with different command line arguments. When the executable is
43      * relaunched the command line will be retrieved from the <code>eclipse.exitdata</code> system property.
44      */

45     public static final Integer JavaDoc EXIT_RELAUNCH = new Integer JavaDoc(24);
46
47     /**
48      * Runs this runnable with the given args and returns a result.
49      * The content of the args is unchecked and should conform to the expectations of
50      * the runnable being invoked. Typically this is a <code>String</code> array.
51      * Applications can return any object they like. If an <code>Integer</code> is returned
52      * it is treated as the program exit code if Eclipse is exiting.
53      *
54      * @param args the argument(s) to pass to the application
55      * @return the return value of the application
56      * @exception Exception if there is a problem running this runnable.
57      * @see #EXIT_OK
58      * @see #EXIT_RESTART
59      * @see #EXIT_RELAUNCH
60      */

61     public Object JavaDoc run(Object JavaDoc args) throws Exception JavaDoc;
62 }
63
Popular Tags