com.ibm.eNetwork.ECL.event
Class ECLPrintJobEvent

java.lang.Object
  |
  +--com.ibm.eNetwork.ECL.event.ECLEvent
        |
        +--com.ibm.eNetwork.ECL.event.ECLPrintJobEvent

public class ECLPrintJobEvent
extends ECLEvent

ECLHostPrintSession fires ECLPrintJobEvents to notify interested listeners about a current print job.

There are several event types that correlate to the nature of a print job state change or an error condition occurrence. Some event types contain additional information.

1. Startup

When a ECLHostPrintSession establishes a printer session, it fires an ECLPrintJobEvent of type EHPE_PRINT_JOB_PRINTER_READY.

2. Printing a Job

A print job has three stages: Start, Data, End.

3. Processing an error

When an error occurs, the ECLHostPrintSession fires an ECLHostPrintEvent of type EHPE_PRINT_JOB_ERROR. It then waits for a response that should be sent to it via ECLPS.SendKey(...). There is no timeout while ECLHostPrintSession is waiting for a response.

The following is the list of possible SendKeys(String) responses:

4. Termination

When an ECLHostPrintSessio is terminated, no ECLPrintJobEvent is fired.

See Also:
ECLHostPrintSession.addPrintJobListener(com.ibm.eNetwork.ECL.event.ECLPrintJobListener), ECLPrintJobListener

Field Summary
static int EHPE_PRINT_JOB_COMPLETED
           
static int EHPE_PRINT_JOB_ERROR
           
static int EHPE_PRINT_JOB_ERROR_INTERV_FILE
           
static int EHPE_PRINT_JOB_ERROR_INTERV_LPT
           
static int EHPE_PRINT_JOB_ERROR_INTERV_PRINTER
           
static int EHPE_PRINT_JOB_ERROR_INTERV_REQUIRED
           
static int EHPE_PRINT_JOB_ERROR_PDT_NOTFOUND
           
static int EHPE_PRINT_JOB_ERROR_PRINTER_CHANGETODEFAULT
           
static int EHPE_PRINT_JOB_ERROR_PRINTER_NONE_INSTALLED
           
static int EHPE_PRINT_JOB_ERROR_PRINTER_NOTFOUND
           
static int EHPE_PRINT_JOB_ERROR_PRINTER_NOTFOUNDANDLOCKED
           
static int EHPE_PRINT_JOB_ERROR_PRINTER_PAPEROUT
           
static int EHPE_PRINT_JOB_ERROR_PRINTER_TIMEDOUT
           
static int EHPE_PRINT_JOB_NO_CODE
           
static int EHPE_PRINT_JOB_PRINTER_BUSY
           
static int EHPE_PRINT_JOB_PRINTER_CANCELING
           
static int EHPE_PRINT_JOB_PRINTER_INUSE
           
static int EHPE_PRINT_JOB_PRINTER_READY
           
static int EHPE_PRINT_JOB_STARTED
           
static int EHPE_PRINT_JOB_STATUS_UPDATE
           
 
Constructor Summary
ECLPrintJobEvent(java.lang.Object source, int type)
          This is an alternate constructor used to create an ECLPrintJobEvent object.
ECLPrintJobEvent(java.lang.Object source, int type, int code, java.lang.String extraInformation)
          This is the main constructor used to create an ECLPrintJobEvent object.
 
Method Summary
 int getEvent()
          This method returns the type of the event object.
 int getEventCode()
          This method returns detailed information for the event object.
 java.lang.String getEventExtraInformation()
          This method returns additional details about the event.
 
Methods inherited from class com.ibm.eNetwork.ECL.event.ECLEvent
GetSource, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

EHPE_PRINT_JOB_STARTED

public static final int EHPE_PRINT_JOB_STARTED

EHPE_PRINT_JOB_COMPLETED

public static final int EHPE_PRINT_JOB_COMPLETED

EHPE_PRINT_JOB_ERROR

public static final int EHPE_PRINT_JOB_ERROR

EHPE_PRINT_JOB_PRINTER_READY

public static final int EHPE_PRINT_JOB_PRINTER_READY

EHPE_PRINT_JOB_PRINTER_BUSY

public static final int EHPE_PRINT_JOB_PRINTER_BUSY

EHPE_PRINT_JOB_PRINTER_INUSE

public static final int EHPE_PRINT_JOB_PRINTER_INUSE

EHPE_PRINT_JOB_PRINTER_CANCELING

public static final int EHPE_PRINT_JOB_PRINTER_CANCELING

EHPE_PRINT_JOB_STATUS_UPDATE

public static final int EHPE_PRINT_JOB_STATUS_UPDATE

EHPE_PRINT_JOB_NO_CODE

public static final int EHPE_PRINT_JOB_NO_CODE

EHPE_PRINT_JOB_ERROR_INTERV_REQUIRED

public static final int EHPE_PRINT_JOB_ERROR_INTERV_REQUIRED

EHPE_PRINT_JOB_ERROR_INTERV_PRINTER

public static final int EHPE_PRINT_JOB_ERROR_INTERV_PRINTER

EHPE_PRINT_JOB_ERROR_INTERV_FILE

public static final int EHPE_PRINT_JOB_ERROR_INTERV_FILE

EHPE_PRINT_JOB_ERROR_INTERV_LPT

public static final int EHPE_PRINT_JOB_ERROR_INTERV_LPT

EHPE_PRINT_JOB_ERROR_PRINTER_NOTFOUND

public static final int EHPE_PRINT_JOB_ERROR_PRINTER_NOTFOUND

EHPE_PRINT_JOB_ERROR_PRINTER_NONE_INSTALLED

public static final int EHPE_PRINT_JOB_ERROR_PRINTER_NONE_INSTALLED

EHPE_PRINT_JOB_ERROR_PRINTER_NOTFOUNDANDLOCKED

public static final int EHPE_PRINT_JOB_ERROR_PRINTER_NOTFOUNDANDLOCKED

EHPE_PRINT_JOB_ERROR_PRINTER_CHANGETODEFAULT

public static final int EHPE_PRINT_JOB_ERROR_PRINTER_CHANGETODEFAULT

EHPE_PRINT_JOB_ERROR_PRINTER_PAPEROUT

public static final int EHPE_PRINT_JOB_ERROR_PRINTER_PAPEROUT

EHPE_PRINT_JOB_ERROR_PRINTER_TIMEDOUT

public static final int EHPE_PRINT_JOB_ERROR_PRINTER_TIMEDOUT

EHPE_PRINT_JOB_ERROR_PDT_NOTFOUND

public static final int EHPE_PRINT_JOB_ERROR_PDT_NOTFOUND
Constructor Detail

ECLPrintJobEvent

public ECLPrintJobEvent(java.lang.Object source,
                        int type,
                        int code,
                        java.lang.String extraInformation)
This is the main constructor used to create an ECLPrintJobEvent object.
Parameters:
source - Source object that created this event.
type - Value used to identify what type event has occured.
code - Value used to give details about the event.
extraInformation - Value used to provide additional details about the event.
See Also:
ECLPrintJobListener

ECLPrintJobEvent

public ECLPrintJobEvent(java.lang.Object source,
                        int type)
This is an alternate constructor used to create an ECLPrintJobEvent object. The code option is filled in with a default value.
Parameters:
source - Source object that created this event.
type - Value used to identify what type event has occured.
See Also:
ECLPrintJobListener
Method Detail

getEvent

public int getEvent()
This method returns the type of the event object.
Returns:
An integer that identifies the event type. The value can be one or more (logically OR'd) of the following events:

  • EHPE_PRINT_JOB_STARTED
  • EHPE_PRINT_JOB_COMPLETED
  • EHPE_PRINT_JOB_ERROR
  • EHPE_PRINT_JOB_PRINTER_READY
  • EHPE_PRINT_JOB_PRINTER_BUSY
  • EHPE_PRINT_JOB_PRINTER_INUSE
  • EHPE_PRINT_JOB_PRINTER_CANCELING
  • EHPE_PRINT_JOB_STATUS_UPDATE

getEventCode

public int getEventCode()
This method returns detailed information for the event object.
Returns:
An integer that identifies the event code. In the case of a EHPE_PRINT_JOB_ERROR event, the following are valid values:

  • EHPE_PRINT_JOB_NO_CODE
  • EHPE_PRINT_JOB_ERROR_INTERV_REQUIRED
  • EHPE_PRINT_JOB_ERROR_INTERV_PRINTER
  • EHPE_PRINT_JOB_ERROR_INTERV_FILE
  • EHPE_PRINT_JOB_ERROR_INTERV_LPT
  • EHPE_PRINT_JOB_ERROR_PRINTER_NOTFOUND
  • EHPE_PRINT_JOB_ERROR_PRINTER_NOTFOUNDANDLOCKED
  • EHPE_PRINT_JOB_ERROR_PRINTER_CHANGETODEFAULT
  • EHPE_PRINT_JOB_ERROR_PRINTER_PAPEROUT
  • EHPE_PRINT_JOB_ERROR_PRINTER_TIMEDOUT
  • EHPE_PRINT_JOB_ERROR_PDT_NOTFOUND

In the case of a EHPE_PRINT_JOB_STATUS_UPDATE event, this value contains the current page number being printed.


getEventExtraInformation

public java.lang.String getEventExtraInformation()
This method returns additional details about the event.
Returns:
A string that may contains additional details about the event. In the case of a EHPE_PRINT_JOB_STATUS_UPDATE event, this value contains print destination information.