javax.print
Interface CancelablePrintJob

All Superinterfaces:
DocPrintJob

public interface CancelablePrintJob
extends DocPrintJob

CancelablePrintJob represents a print job which can be canceled.

It is implemented by DocPrintJobs which support to cancel a print job during processing. Clients need to explicitly test if a given DocPrintJob object from a print service implementes this interface and therefore supports cancelling.

Implementor of java print services should implement this interface if cancelling is supported by the underlying print system. If implemented the corresponding print job event PrintJobEvent.JOB_CANCELED should be delivered to registered clients. Implementations have to be thread-safe.


Method Summary
 void cancel()
          Cancel the print job.
 
Methods inherited from interface javax.print.DocPrintJob
addPrintJobAttributeListener, addPrintJobListener, getAttributes, getPrintService, print, removePrintJobAttributeListener, removePrintJobListener
 

Method Detail

cancel

void cancel()
            throws PrintException
Cancel the print job.

Throws:
PrintException - if an error during cancellation occurs.