src/share/classes/javax/print/attribute/standard/JobPriority.java

Print this page


   1 /*
   2  * Copyright (c) 2000, 2004, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any


  37  * priority for scheduling the job. A higher value specifies a higher priority.
  38  * The value 1 indicates the lowest possible priority. The value 100 indicates
  39  * the highest possible priority. Among those jobs that are ready to print, a
  40  * printer must print all jobs with a priority value of <I>n</I> before printing
  41  * those with a priority value of <I>n</I>-1 for all <I>n.</I>
  42  * <P>
  43  * If the client does not specify a JobPriority attribute for a Print Job and
  44  * the printer does support the JobPriority attribute, the printer must use an
  45  * implementation-defined default JobPriority value.
  46  * <P>
  47  * The client can always specify any job priority value from 1 to 100 for a job.
  48  * However, a Print Service instance may support fewer than 100 different
  49  * job priority levels. If this is the case, the Print Service instance
  50  * automatically maps the client-specified job priority value to one of the
  51  * supported job priority levels, dividing the 100 job priority values equally
  52  * among the available job priority levels.
  53  * <P>
  54  * <B>IPP Compatibility:</B> The integer value gives the IPP integer value. The
  55  * category name returned by <CODE>getName()</CODE> gives the IPP attribute
  56  * name.
  57  * <P>
  58  *
  59  * @author  Alan Kaminsky
  60  */
  61 public final class JobPriority extends IntegerSyntax
  62     implements PrintRequestAttribute, PrintJobAttribute {
  63 
  64     private static final long serialVersionUID = -4599900369040602769L;
  65 
  66     /**
  67      * Construct a new job priority attribute with the given integer value.
  68      *
  69      * @param  value  Integer value.
  70      *
  71      * @exception  IllegalArgumentException
  72      *     (Unchecked exception) Thrown if <CODE>value</CODE> is less than 1
  73      *     or greater than 100.
  74      */
  75     public JobPriority(int value) {
  76         super (value, 1, 100);
  77     }


   1 /*
   2  * Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any


  37  * priority for scheduling the job. A higher value specifies a higher priority.
  38  * The value 1 indicates the lowest possible priority. The value 100 indicates
  39  * the highest possible priority. Among those jobs that are ready to print, a
  40  * printer must print all jobs with a priority value of <I>n</I> before printing
  41  * those with a priority value of <I>n</I>-1 for all <I>n.</I>
  42  * <P>
  43  * If the client does not specify a JobPriority attribute for a Print Job and
  44  * the printer does support the JobPriority attribute, the printer must use an
  45  * implementation-defined default JobPriority value.
  46  * <P>
  47  * The client can always specify any job priority value from 1 to 100 for a job.
  48  * However, a Print Service instance may support fewer than 100 different
  49  * job priority levels. If this is the case, the Print Service instance
  50  * automatically maps the client-specified job priority value to one of the
  51  * supported job priority levels, dividing the 100 job priority values equally
  52  * among the available job priority levels.
  53  * <P>
  54  * <B>IPP Compatibility:</B> The integer value gives the IPP integer value. The
  55  * category name returned by <CODE>getName()</CODE> gives the IPP attribute
  56  * name.

  57  *
  58  * @author  Alan Kaminsky
  59  */
  60 public final class JobPriority extends IntegerSyntax
  61     implements PrintRequestAttribute, PrintJobAttribute {
  62 
  63     private static final long serialVersionUID = -4599900369040602769L;
  64 
  65     /**
  66      * Construct a new job priority attribute with the given integer value.
  67      *
  68      * @param  value  Integer value.
  69      *
  70      * @exception  IllegalArgumentException
  71      *     (Unchecked exception) Thrown if <CODE>value</CODE> is less than 1
  72      *     or greater than 100.
  73      */
  74     public JobPriority(int value) {
  75         super (value, 1, 100);
  76     }