|
From: <caw...@us...> - 2007-04-03 18:02:38
|
Revision: 2268
http://svn.sourceforge.net/rubyeclipse/?rev=2268&view=rev
Author: cawilliams
Date: 2007-04-03 11:02:35 -0700 (Tue, 03 Apr 2007)
Log Message:
-----------
add new interface that search will be using
Added Paths:
-----------
trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/search/processing/IJob.java
Added: trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/search/processing/IJob.java
===================================================================
--- trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/search/processing/IJob.java (rev 0)
+++ trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/search/processing/IJob.java 2007-04-03 18:02:35 UTC (rev 2268)
@@ -0,0 +1,43 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.rubypeople.rdt.internal.core.search.processing;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+
+public interface IJob {
+
+ /* Waiting policies */
+ int ForceImmediate = 1;
+ int CancelIfNotReady = 2;
+ int WaitUntilReady = 3;
+
+ /* Job's result */
+ boolean FAILED = false;
+ boolean COMPLETE = true;
+
+ /**
+ * Answer true if the job belongs to a given family (tag)
+ */
+ public boolean belongsTo(String jobFamily);
+ /**
+ * Asks this job to cancel its execution. The cancellation
+ * can take an undertermined amount of time.
+ */
+ public void cancel();
+ /**
+ * Ensures that this job is ready to run.
+ */
+ public void ensureReadyToRun();
+ /**
+ * Execute the current job, answer whether it was successful.
+ */
+ public boolean execute(IProgressMonitor progress);
+}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|