1 /* 2 * @(#)MultiDocPrintJob.java 1.4 03/12/19 3 * 4 * Copyright 2004 Sun Microsystems, Inc. All rights reserved. 5 * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. 6 */ 7 8 package javax.print; 9 10 import javax.print.attribute.PrintRequestAttributeSet; 11 12 /** 13 * 14 * Obtained from a MultiDocPrintService, a MultiDocPrintJob can print a 15 * specified collection of documents as a single print job with a set of 16 * job attributes. 17 * <P> 18 */ 19 20 public interface MultiDocPrintJob extends DocPrintJob { 21 22 /** 23 * Print a MultiDoc with the specified job attributes. 24 * This method should only be called once for a given print job. 25 * Calling it again will not result in a new job being spooled to 26 * the printer. The service implementation will define policy 27 * for service interruption and recovery. Application clients which 28 * want to monitor the success or failure should register a 29 * PrintJobListener. 30 * 31 * @param multiDoc The documents to be printed. ALL must be a flavor 32 * supported by the PrintJob & PrintService. 33 * 34 * @param attributes The job attributes to be applied to this print job. 35 * If this parameter is null then the default attributes are used. 36 * 37 * @throws PrintException The exception additionally may implement 38 * an interfaces which more precisely describes the cause of the exception 39 * <ul> 40 * <li>FlavorException. 41 * If the document has a flavor not supported by this print job. 42 * <li>AttributeException. 43 * If one or more of the attributes are not valid for this print job. 44 * </ul> 45 */ 46 public void print(MultiDoc multiDoc, PrintRequestAttributeSet attributes) 47 throws PrintException; 48 49 } 50