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