< prev index next >

src/java.desktop/share/classes/javax/print/attribute/standard/PrinterIsAcceptingJobs.java

Print this page




  23  * questions.
  24  */
  25 package javax.print.attribute.standard;
  26 
  27 import javax.print.attribute.Attribute;
  28 import javax.print.attribute.EnumSyntax;
  29 import javax.print.attribute.PrintServiceAttribute;
  30 
  31 /**
  32  * Class PrinterIsAcceptingJobs is a printing attribute class, an enumeration,
  33  * that indicates whether the printer is currently able to accept jobs. This
  34  * value is independent of the {@link PrinterState PrinterState} and {@link
  35  * PrinterStateReasons PrinterStateReasons} attributes because its value does
  36  * not affect the current job; rather it affects future jobs. If the value is
  37  * NOT_ACCEPTING_JOBS, the printer will reject jobs even when the {@link
  38  * PrinterState PrinterState} is IDLE. If value is ACCEPTING_JOBS, the Printer
  39  * will accept jobs even when the {@link PrinterState PrinterState} is STOPPED.
  40  * <P>
  41  * <B>IPP Compatibility:</B> The IPP boolean value is "true" for ACCEPTING_JOBS
  42  * and "false" for NOT_ACCEPTING_JOBS. The category name returned by
  43  * <CODE>getName()</CODE> is the IPP attribute name.  The enumeration's
  44  * integer value is the IPP enum value.  The <code>toString()</code> method
  45  * returns the IPP string representation of the attribute value.
  46  *
  47  * @author  Alan Kaminsky
  48  */
  49 public final class PrinterIsAcceptingJobs extends EnumSyntax
  50         implements PrintServiceAttribute {
  51 
  52     private static final long serialVersionUID = -5052010680537678061L;
  53 
  54     /**
  55      * The printer is currently rejecting any jobs sent to it.
  56      */
  57     public static final PrinterIsAcceptingJobs
  58         NOT_ACCEPTING_JOBS = new PrinterIsAcceptingJobs(0);
  59 
  60     /**
  61      * The printer is currently accepting jobs.
  62      */
  63     public static final PrinterIsAcceptingJobs
  64         ACCEPTING_JOBS = new PrinterIsAcceptingJobs(1);


  99 
 100     /**
 101      * Get the printing attribute class which is to be used as the "category"
 102      * for this printing attribute value.
 103      * <P>
 104      * For class PrinterIsAcceptingJobs, the
 105      * category is class PrinterIsAcceptingJobs itself.
 106      *
 107      * @return  Printing attribute class (category), an instance of class
 108      *          {@link java.lang.Class java.lang.Class}.
 109      */
 110     public final Class<? extends Attribute> getCategory() {
 111         return PrinterIsAcceptingJobs.class;
 112     }
 113 
 114     /**
 115      * Get the name of the category of which this attribute value is an
 116      * instance.
 117      * <P>
 118      * For class PrinterIsAcceptingJobs, the
 119      * category name is <CODE>"printer-is-accepting-jobs"</CODE>.
 120      *
 121      * @return  Attribute category name.
 122      */
 123     public final String getName() {
 124         return "printer-is-accepting-jobs";
 125     }
 126 
 127 }


  23  * questions.
  24  */
  25 package javax.print.attribute.standard;
  26 
  27 import javax.print.attribute.Attribute;
  28 import javax.print.attribute.EnumSyntax;
  29 import javax.print.attribute.PrintServiceAttribute;
  30 
  31 /**
  32  * Class PrinterIsAcceptingJobs is a printing attribute class, an enumeration,
  33  * that indicates whether the printer is currently able to accept jobs. This
  34  * value is independent of the {@link PrinterState PrinterState} and {@link
  35  * PrinterStateReasons PrinterStateReasons} attributes because its value does
  36  * not affect the current job; rather it affects future jobs. If the value is
  37  * NOT_ACCEPTING_JOBS, the printer will reject jobs even when the {@link
  38  * PrinterState PrinterState} is IDLE. If value is ACCEPTING_JOBS, the Printer
  39  * will accept jobs even when the {@link PrinterState PrinterState} is STOPPED.
  40  * <P>
  41  * <B>IPP Compatibility:</B> The IPP boolean value is "true" for ACCEPTING_JOBS
  42  * and "false" for NOT_ACCEPTING_JOBS. The category name returned by
  43  * {@code getName()} is the IPP attribute name.  The enumeration's
  44  * integer value is the IPP enum value.  The {@code toString()} method
  45  * returns the IPP string representation of the attribute value.
  46  *
  47  * @author  Alan Kaminsky
  48  */
  49 public final class PrinterIsAcceptingJobs extends EnumSyntax
  50         implements PrintServiceAttribute {
  51 
  52     private static final long serialVersionUID = -5052010680537678061L;
  53 
  54     /**
  55      * The printer is currently rejecting any jobs sent to it.
  56      */
  57     public static final PrinterIsAcceptingJobs
  58         NOT_ACCEPTING_JOBS = new PrinterIsAcceptingJobs(0);
  59 
  60     /**
  61      * The printer is currently accepting jobs.
  62      */
  63     public static final PrinterIsAcceptingJobs
  64         ACCEPTING_JOBS = new PrinterIsAcceptingJobs(1);


  99 
 100     /**
 101      * Get the printing attribute class which is to be used as the "category"
 102      * for this printing attribute value.
 103      * <P>
 104      * For class PrinterIsAcceptingJobs, the
 105      * category is class PrinterIsAcceptingJobs itself.
 106      *
 107      * @return  Printing attribute class (category), an instance of class
 108      *          {@link java.lang.Class java.lang.Class}.
 109      */
 110     public final Class<? extends Attribute> getCategory() {
 111         return PrinterIsAcceptingJobs.class;
 112     }
 113 
 114     /**
 115      * Get the name of the category of which this attribute value is an
 116      * instance.
 117      * <P>
 118      * For class PrinterIsAcceptingJobs, the
 119      * category name is {@code "printer-is-accepting-jobs"}.
 120      *
 121      * @return  Attribute category name.
 122      */
 123     public final String getName() {
 124         return "printer-is-accepting-jobs";
 125     }
 126 
 127 }
< prev index next >