1. /*
  2. * @(#)URIException.java 1.4 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 java.net.URI;
  9. /**
  10. * Interface URIException is a mixin interface which a subclass of {@link
  11. * PrintException PrintException} can implement to report an error condition
  12. * involving a URI address. The Print Service API does not define any print
  13. * exception classes that implement interface URIException, that being left to
  14. * the Print Service implementor's discretion.
  15. *
  16. */
  17. public interface URIException {
  18. /**
  19. * Indicates that the printer cannot access the URI address.
  20. * For example, the printer might report this error if it goes to get
  21. * the print data and cannot even establish a connection to the
  22. * URI address.
  23. */
  24. public static final int URIInaccessible = 1;
  25. /**
  26. * Indicates that the printer does not support the URI
  27. * scheme ("http", "ftp", etc.) in the URI address.
  28. */
  29. public static final int URISchemeNotSupported = 2;
  30. /**
  31. * Indicates any kind of problem not specifically identified
  32. * by the other reasons.
  33. */
  34. public static final int URIOtherProblem = -1;
  35. /**
  36. * Return the URI.
  37. * @return the URI that is the cause of this exception.
  38. */
  39. public URI getUnsupportedURI();
  40. /**
  41. * Return the reason for the event.
  42. * @return one of the predefined reasons enumerated in this interface.
  43. */
  44. public int getReason();
  45. }