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