blob: 31f8bd1cee9c581b986fca18ed73764aedd6b53b [file] [log] [blame]
/*******************************************************************************
* Copyright (c) 2000, 2003 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Common Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/cpl-v10.html
*
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
package org.eclipse.search.internal.core;
import org.eclipse.core.runtime.IProgressMonitor;
public abstract class Job {
/**
* Answer true if the job belongs to a given family (tag)
*/
public abstract boolean belongsTo(Object jobFamily);
/**
* Asks this job to cancel its execution. The cancellation
* can take an undertermined amount of time.
*/
public abstract void cancel();
/**
* Answer whether the job is ready to run.
*/
public abstract boolean isReadyToRun();
/**
* Execute the current job, answer whether it was successful.
*/
public abstract boolean run(IProgressMonitor monitor);
}