//******************************************************************************
//
// File:    CancelablePrintJob.java
// Package: net.jini.print.job
// Unit:    Interface net.jini.print.job.CancelablePrintJob
//
//******************************************************************************

package net.jini.print.job;

import java.rmi.RemoteException;

/**
 * Interface CancelablePrintJob provides an operation for canceling a submitted 
 * Print Job. This is an optional capability that not all Jini Print Service 
 * instances need support. If a Jini Print Service instance supports canceling 
 * print jobs, the print service will return Print Job objects that implement 
 * interface CancelablePrintJob as well as interface {@link PrintJob PrintJob}. 
 * <P>
 * There is no restriction on the number of client threads that may be 
 * simultaneously accessing the same Print Job. Therefore, all implementations 
 * of interface PrintJob and its subinterfaces must be designed to be multiple 
 * thread safe. 
 * <P>
 * Interface CancelablePrintJob's methods all throw {@link 
 * java.rmi.RemoteException RemoteException} to provide for the possibility that 
 * the Print Job object's implementation performs remote method calls. The Print 
 * Job object's implementation in fact may or may not perform remote method 
 * calls. 
 * <P>
 * <B>DRAFT STANDARD VERSION 1.0 (23-MAY-2000)</B>
 *
 * @author  Alan Kaminsky
 * @version 12-May-2000
 */
public interface CancelablePrintJob
	extends PrintJob
	{

// Exported operations.

	/**
	 * Cancel this Print Job. Calling <CODE>cancel()</CODE> on an 
	 * already-canceled Print Job has no effect. 
	 *
	 * @exception  PrintJobException
	 *     Thrown if there was an error canceling this Print Job. Canceling an 
	 *     already-canceled Print Job is <I>not</I> considered an error. 
	 * @exception  RemoteException
	 *     Thrown if a remote error occurred.
	 */
	public void cancel()
		throws PrintJobException, RemoteException;

	}