javax.print.event
Class PrintJobEvent

java.lang.Object
  extended by java.util.EventObject
      extended by javax.print.event.PrintEvent
          extended by javax.print.event.PrintJobEvent
All Implemented Interfaces:
Serializable

public class PrintJobEvent
extends PrintEvent

PrintJobEvents are generated by a print job during print job processing to inform registered listeners about the state of processing.

See Also:
Serialized Form

Field Summary
static int DATA_TRANSFER_COMPLETE
          Indicates that the data transfer to the print service has completed.
static int JOB_CANCELED
          Indicates that the print job was canceled.
static int JOB_COMPLETE
          Indicates that the print job was completed (=printed).
static int JOB_FAILED
          Indicates that the print job failed to complete.
static int NO_MORE_EVENTS
          Indicates that no more job events will be send.
static int REQUIRES_ATTENTION
          Indicates a situation where human intervention might be needed.
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
PrintJobEvent(DocPrintJob source, int reason)
          Constructs a PrintJobEvent object.
 
Method Summary
 int getPrintEventType()
          Returns the reason for this event.
 DocPrintJob getPrintJob()
          Returns the print job that generated this event.
 
Methods inherited from class javax.print.event.PrintEvent
toString
 
Methods inherited from class java.util.EventObject
getSource
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DATA_TRANSFER_COMPLETE

public static final int DATA_TRANSFER_COMPLETE
Indicates that the data transfer to the print service has completed.

See Also:
Constant Field Values

JOB_CANCELED

public static final int JOB_CANCELED
Indicates that the print job was canceled.

See Also:
Constant Field Values

JOB_COMPLETE

public static final int JOB_COMPLETE
Indicates that the print job was completed (=printed).

See Also:
Constant Field Values

JOB_FAILED

public static final int JOB_FAILED
Indicates that the print job failed to complete.

See Also:
Constant Field Values

NO_MORE_EVENTS

public static final int NO_MORE_EVENTS
Indicates that no more job events will be send.

See Also:
Constant Field Values

REQUIRES_ATTENTION

public static final int REQUIRES_ATTENTION
Indicates a situation where human intervention might be needed. E.g. the printer run out of paper or a paper jam occured.

See Also:
Constant Field Values
Constructor Detail

PrintJobEvent

public PrintJobEvent(DocPrintJob source,
                     int reason)
Constructs a PrintJobEvent object.

Parameters:
source - the source generating this event
reason - the reason for this event
Method Detail

getPrintEventType

public int getPrintEventType()
Returns the reason for this event.

Returns:
The reason.

getPrintJob

public DocPrintJob getPrintJob()
Returns the print job that generated this event.

Returns:
The print job.