Path: blob/master/src/java.desktop/share/classes/javax/print/URIException.java
41153 views
/*1* Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.2* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.3*4* This code is free software; you can redistribute it and/or modify it5* under the terms of the GNU General Public License version 2 only, as6* published by the Free Software Foundation. Oracle designates this7* particular file as subject to the "Classpath" exception as provided8* by Oracle in the LICENSE file that accompanied this code.9*10* This code is distributed in the hope that it will be useful, but WITHOUT11* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or12* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License13* version 2 for more details (a copy is included in the LICENSE file that14* accompanied this code).15*16* You should have received a copy of the GNU General Public License version17* 2 along with this work; if not, write to the Free Software Foundation,18* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.19*20* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA21* or visit www.oracle.com if you need additional information or have any22* questions.23*/2425package javax.print;2627import java.net.URI;2829/**30* Interface {@code URIException} is a mixin interface which a subclass of31* {@link PrintException PrintException} can implement to report an error32* condition involving a {@code URI} address. The Print Service API does not33* define any print exception classes that implement interface34* {@code URIException}, that being left to the Print Service implementor's35* discretion.36*/37public interface URIException {3839/**40* Indicates that the printer cannot access the {@code URI} address. For41* example, the printer might report this error if it goes to get the print42* data and cannot even establish a connection to the {@code URI} address.43*/44public static final int URIInaccessible = 1;4546/**47* Indicates that the printer does not support the {@code URI} scheme48* ("http", "ftp", etc.) in the {@code URI} address.49*/50public static final int URISchemeNotSupported = 2;5152/**53* Indicates any kind of problem not specifically identified by the other54* reasons.55*/56public static final int URIOtherProblem = -1;5758/**59* Returns the {@code URI}.60*61* @return the {@code URI} that is the cause of this exception62*/63public URI getUnsupportedURI();6465/**66* Returns the reason of this exception.67*68* @return one of the predefined reasons enumerated in this interface69*/70public int getReason();71}727374