KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > jdt > internal > core > search > processing > IJob


1 /*******************************************************************************
2  * Copyright (c) 2000, 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.jdt.internal.core.search.processing;
12
13 import org.eclipse.core.runtime.IProgressMonitor;
14
15 public interface IJob {
16
17     /* Waiting policies */
18     int ForceImmediate = 1;
19     int CancelIfNotReady = 2;
20     int WaitUntilReady = 3;
21
22     /* Job's result */
23     boolean FAILED = false;
24     boolean COMPLETE = true;
25
26     /**
27      * Answer true if the job belongs to a given family (tag)
28      */

29     public boolean belongsTo(String JavaDoc jobFamily);
30     /**
31      * Asks this job to cancel its execution. The cancellation
32      * can take an undertermined amount of time.
33      */

34     public void cancel();
35     /**
36      * Ensures that this job is ready to run.
37      */

38     public void ensureReadyToRun();
39     /**
40      * Execute the current job, answer whether it was successful.
41      */

42     public boolean execute(IProgressMonitor progress);
43 }
44
Popular Tags