31 * Class JobStateReason is a printing attribute class, an enumeration, that
32 * provides additional information about the job's current state, i.e.,
33 * information that augments the value of the job's {@link JobState JobState}
34 * attribute. Class JobStateReason defines standard job state reason values. A
35 * Print Service implementation only needs to report those job state
36 * reasons which are appropriate for the particular implementation; it does not
37 * have to report every defined job state reason.
38 * <P>
39 * Instances of JobStateReason do not appear in a Print Job's attribute set
40 * directly. Rather, a {@link JobStateReasons JobStateReasons} attribute appears
41 * in the Print Job's attribute set. The {@link JobStateReasons JobStateReasons}
42 * attribute contains zero, one, or more than one JobStateReason objects which
43 * pertain to the Print Job's status. The printer adds a JobStateReason object
44 * to the Print Job's {@link JobStateReasons JobStateReasons} attribute when the
45 * corresponding condition becomes true of the Print Job, and the printer
46 * removes the JobStateReason object again when the corresponding condition
47 * becomes false, regardless of whether the Print Job's overall {@link JobState
48 * JobState} also changed.
49 * <P>
50 * <B>IPP Compatibility:</B> The category name returned by
51 * <CODE>getName()</CODE> is the IPP attribute name. The enumeration's
52 * integer value is the IPP enum value. The <code>toString()</code> method
53 * returns the IPP string representation of the attribute value.
54 *
55 * @author Alan Kaminsky
56 */
57 public class JobStateReason extends EnumSyntax implements Attribute {
58
59 private static final long serialVersionUID = -8765894420449009168L;
60
61 /**
62 * The printer has created the Print Job, but the printer has not finished
63 * accessing or accepting all the print data yet.
64 */
65 public static final JobStateReason
66 JOB_INCOMING = new JobStateReason(0);
67
68 /**
69 * The printer has created the Print Job, but the printer is expecting
70 * additional print data before it can move the job into the PROCESSING
71 * state. If a printer starts processing before it has received all data,
72 * the printer removes the JOB_DATA_INSUFFICIENT reason, but the
242 * actually not among those supported by the printer. This value must be
243 * supported, since {@link Compression Compression} is a required doc
244 * description attribute.
245 */
246 public static final JobStateReason
247 UNSUPPORTED_COMPRESSION = new JobStateReason(18);
248
249 /**
250 * The job was aborted by the system because the printer encountered an
251 * error in the document data while decompressing it. If the printer posts
252 * this reason, the document data has already passed any tests that would
253 * have led to the UNSUPPORTED_COMPRESSION job state reason.
254 */
255 public static final JobStateReason
256 COMPRESSION_ERROR = new JobStateReason(19);
257
258 /**
259 * The job was aborted by the system because the document data's document
260 * format (doc flavor) is not among those supported by the printer. If the
261 * client specifies a doc flavor with a MIME type of
262 * <CODE>"application/octet-stream"</CODE>, the printer may abort the job if
263 * the printer cannot determine the document data's actual format through
264 * auto-sensing (even if the printer supports the document format if
265 * specified explicitly). This value must be supported, since a doc flavor
266 * is required to be specified for each doc.
267 */
268 public static final JobStateReason
269 UNSUPPORTED_DOCUMENT_FORMAT = new JobStateReason(20);
270
271 /**
272 * The job was aborted by the system because the printer encountered an
273 * error in the document data while processing it. If the printer posts this
274 * reason, the document data has already passed any tests that would have
275 * led to the UNSUPPORTED_DOCUMENT_FORMAT job state reason.
276 */
277 public static final JobStateReason
278 DOCUMENT_FORMAT_ERROR = new JobStateReason(21);
279
280 /**
281 * The requester has canceled the job or the printer has aborted the job,
282 * but the printer is still performing some actions on the job until a
432
433 /**
434 * Get the printing attribute class which is to be used as the "category"
435 * for this printing attribute value.
436 * <P>
437 * For class JobStateReason and any vendor-defined subclasses, the
438 * category is class JobStateReason itself.
439 *
440 * @return Printing attribute class (category), an instance of class
441 * {@link java.lang.Class java.lang.Class}.
442 */
443 public final Class<? extends Attribute> getCategory() {
444 return JobStateReason.class;
445 }
446
447 /**
448 * Get the name of the category of which this attribute value is an
449 * instance.
450 * <P>
451 * For class JobStateReason and any vendor-defined subclasses, the
452 * category name is <CODE>"job-state-reason"</CODE>.
453 *
454 * @return Attribute category name.
455 */
456 public final String getName() {
457 return "job-state-reason";
458 }
459
460 }
|
31 * Class JobStateReason is a printing attribute class, an enumeration, that
32 * provides additional information about the job's current state, i.e.,
33 * information that augments the value of the job's {@link JobState JobState}
34 * attribute. Class JobStateReason defines standard job state reason values. A
35 * Print Service implementation only needs to report those job state
36 * reasons which are appropriate for the particular implementation; it does not
37 * have to report every defined job state reason.
38 * <P>
39 * Instances of JobStateReason do not appear in a Print Job's attribute set
40 * directly. Rather, a {@link JobStateReasons JobStateReasons} attribute appears
41 * in the Print Job's attribute set. The {@link JobStateReasons JobStateReasons}
42 * attribute contains zero, one, or more than one JobStateReason objects which
43 * pertain to the Print Job's status. The printer adds a JobStateReason object
44 * to the Print Job's {@link JobStateReasons JobStateReasons} attribute when the
45 * corresponding condition becomes true of the Print Job, and the printer
46 * removes the JobStateReason object again when the corresponding condition
47 * becomes false, regardless of whether the Print Job's overall {@link JobState
48 * JobState} also changed.
49 * <P>
50 * <B>IPP Compatibility:</B> The category name returned by
51 * {@code getName()} is the IPP attribute name. The enumeration's
52 * integer value is the IPP enum value. The {@code toString()} method
53 * returns the IPP string representation of the attribute value.
54 *
55 * @author Alan Kaminsky
56 */
57 public class JobStateReason extends EnumSyntax implements Attribute {
58
59 private static final long serialVersionUID = -8765894420449009168L;
60
61 /**
62 * The printer has created the Print Job, but the printer has not finished
63 * accessing or accepting all the print data yet.
64 */
65 public static final JobStateReason
66 JOB_INCOMING = new JobStateReason(0);
67
68 /**
69 * The printer has created the Print Job, but the printer is expecting
70 * additional print data before it can move the job into the PROCESSING
71 * state. If a printer starts processing before it has received all data,
72 * the printer removes the JOB_DATA_INSUFFICIENT reason, but the
242 * actually not among those supported by the printer. This value must be
243 * supported, since {@link Compression Compression} is a required doc
244 * description attribute.
245 */
246 public static final JobStateReason
247 UNSUPPORTED_COMPRESSION = new JobStateReason(18);
248
249 /**
250 * The job was aborted by the system because the printer encountered an
251 * error in the document data while decompressing it. If the printer posts
252 * this reason, the document data has already passed any tests that would
253 * have led to the UNSUPPORTED_COMPRESSION job state reason.
254 */
255 public static final JobStateReason
256 COMPRESSION_ERROR = new JobStateReason(19);
257
258 /**
259 * The job was aborted by the system because the document data's document
260 * format (doc flavor) is not among those supported by the printer. If the
261 * client specifies a doc flavor with a MIME type of
262 * {@code "application/octet-stream"}, the printer may abort the job if
263 * the printer cannot determine the document data's actual format through
264 * auto-sensing (even if the printer supports the document format if
265 * specified explicitly). This value must be supported, since a doc flavor
266 * is required to be specified for each doc.
267 */
268 public static final JobStateReason
269 UNSUPPORTED_DOCUMENT_FORMAT = new JobStateReason(20);
270
271 /**
272 * The job was aborted by the system because the printer encountered an
273 * error in the document data while processing it. If the printer posts this
274 * reason, the document data has already passed any tests that would have
275 * led to the UNSUPPORTED_DOCUMENT_FORMAT job state reason.
276 */
277 public static final JobStateReason
278 DOCUMENT_FORMAT_ERROR = new JobStateReason(21);
279
280 /**
281 * The requester has canceled the job or the printer has aborted the job,
282 * but the printer is still performing some actions on the job until a
432
433 /**
434 * Get the printing attribute class which is to be used as the "category"
435 * for this printing attribute value.
436 * <P>
437 * For class JobStateReason and any vendor-defined subclasses, the
438 * category is class JobStateReason itself.
439 *
440 * @return Printing attribute class (category), an instance of class
441 * {@link java.lang.Class java.lang.Class}.
442 */
443 public final Class<? extends Attribute> getCategory() {
444 return JobStateReason.class;
445 }
446
447 /**
448 * Get the name of the category of which this attribute value is an
449 * instance.
450 * <P>
451 * For class JobStateReason and any vendor-defined subclasses, the
452 * category name is {@code "job-state-reason"}.
453 *
454 * @return Attribute category name.
455 */
456 public final String getName() {
457 return "job-state-reason";
458 }
459
460 }
|