public class

PrintJobEvent

extends PrintEvent
java.lang.Object
   ↳ java.util.EventObject
     ↳ javax.print.event.PrintEvent
       ↳ javax.print.event.PrintJobEvent

Class Overview

Class PrintJobEvent encapsulates common events a print job reports to let a listener know of progress in the processing of the DocPrintJob.

Summary

Constants
int DATA_TRANSFER_COMPLETE The job is not necessarily printed yet, but the data has been transferred successfully from the client to the print service.
int JOB_CANCELED The job was canceled by the PrintService.
int JOB_COMPLETE The document cis completely printed.
int JOB_FAILED The print service reports that the job cannot be completed.
int NO_MORE_EVENTS Not all print services may be capable of delivering interesting events, or even telling when a job is complete.
int REQUIRES_ATTENTION The print service indicates that a - possibly transient - problem may require external intervention before the print service can continue.
[Expand]
Inherited Fields
From class java.util.EventObject
Public Constructors
PrintJobEvent(DocPrintJob source, int reason)
Constructs a PrintJobEvent object.
Public Methods
int getPrintEventType()
Gets the reason for this event.
DocPrintJob getPrintJob()
Determines the DocPrintJob to which this print job event pertains.
[Expand]
Inherited Methods
From class javax.print.event.PrintEvent
From class java.util.EventObject
From class java.lang.Object

Constants

public static final int DATA_TRANSFER_COMPLETE

The job is not necessarily printed yet, but the data has been transferred successfully from the client to the print service. The client may free data resources.

Constant Value: 106 (0x0000006a)

public static final int JOB_CANCELED

The job was canceled by the PrintService.

Constant Value: 101 (0x00000065)

public static final int JOB_COMPLETE

The document cis completely printed.

Constant Value: 102 (0x00000066)

public static final int JOB_FAILED

The print service reports that the job cannot be completed. The application must resubmit the job.

Constant Value: 103 (0x00000067)

public static final int NO_MORE_EVENTS

Not all print services may be capable of delivering interesting events, or even telling when a job is complete. This message indicates the print job has no further information or communication with the print service. This message should always be delivered if a terminal event (completed/failed/canceled) is not delivered. For example, if messages such as JOB_COMPLETE have NOT been received before receiving this message, the only inference that should be drawn is that the print service does not support delivering such an event.

Constant Value: 105 (0x00000069)

public static final int REQUIRES_ATTENTION

The print service indicates that a - possibly transient - problem may require external intervention before the print service can continue. One example of an event that can generate this message is when the printer runs out of paper.

Constant Value: 104 (0x00000068)

Public Constructors

public PrintJobEvent (DocPrintJob source, int reason)

Constructs a PrintJobEvent object.

Parameters
source a DocPrintJob object
reason an int specifying the reason.
Throws
IllegalArgumentException if source is null.

Public Methods

public int getPrintEventType ()

Gets the reason for this event.

Returns
  • reason int.

public DocPrintJob getPrintJob ()

Determines the DocPrintJob to which this print job event pertains.

Returns
  • the DocPrintJob object that represents the print job that reports the events encapsulated by this PrintJobEvent.