|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ibm.eNetwork.ECL.event.ECLEvent | +--com.ibm.eNetwork.ECL.event.ECLPrintJobEvent
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.
READY: If a printer was opened successfully, ECLHostPrintSession fires a ECLPrintJobEvent of type EHPE_PRINT_JOB_STARTED.
BUSY: If a busy condition is detected while opening the printer, ECLHostPrintSession will fire an ECLPrintJobEvent. The type is two values ORed together:
( EHPE_PRINT_JOB_PRINTER_BUSY | EHPE_PRINT_JOB_PRINTER_INUSE )
There is no need for a response. When the busy condition is cleared, the print job will be started.
ERROR:
If an error occurred when opening the printer, ECLHostPrintSession
will fire an ECLPrintJobEvent of type EHPE_PRINT_JOB_ERROR.
The event code can be obtained (getEventCode()
).
This may contain additional information:
See Section 3, Processing an error, for more programming information.
While print job data is being process by the ECLHostPrintSession, one or more ECLPrintJobEvent will be fired. The type is two values ORed together:
( EHPE_PRINT_JOB_PRINTER_BUSY | EHPE_PRINT_JOB_STATUS_UPDATE )
3270 Printer Session:
the event code (getEventCode()
) represents page number.
5250 Printer Session: the event code has no meaning.
This event type contains additional information(
getEventExtraInformation()
). It is a String that represents the print destination.
If an error occurs while ECLHostPrintSession is processing print job data, it will fire an ECLHostPrintEvent of type EHPE_PRINT_JOB_ERROR. See Section 3, Processing an error, for more programming information.
When ECLHostPrintSession closes the print job, it fires an ECLHostPrintEvent. The type is two values ORed together:
( EHPE_PRINT_JOB_COMPLETED | EHPE_PRINT_JOB_READY )
ECLPS.SendKey(...)
.
There is no timeout while ECLHostPrintSession is waiting for a response.
The following is the list of possible SendKeys(String)
responses:
<ECLHostPrintSession>.GetPS().SendKeys(ECLSession.CANCELPJOB_STR)
When ECLHostPrintSession receives this keystroke, it cancels the outstanding print job and fires an ECLPrintJobEvent. The type is two values ORed together:
( EHPE_PRINT_JOB_READY | EHPE_PRINT_JOB_CANCELING )
<ECLHostPrintSession>.GetPS().SendKeys(ECLSession.RETRYPRT_STR)
When ECLHostPrintSession receives this keystroke, it fires an ECLPrintJobEvent of type EHPE_PRINT_JOB_READY in response. The host program should be designed to interpret the sequence EHPE_PRINT_JOB_ERROR--"[retryprint]"---EHPE_PRINT_JOB_READY to mean "send the last print datum again". The host program should then send the record again.
The timing of the firing of the EHPE_PRINT_JOB_READY event differs slightly according to host type:
If the error condition occurred at the end of a record, i.e. an EOR was already received for that record, ECLHostPrintSession fires the event immediately.
If the error condition occurred in the middle of a record, the ECLHostPrintSession will wait until receipt of the next EOR before firing the EHPE_PRINT_JOB_READY event..
ECLHostPrintSession fires the event immediately always.
<ECLHostPrintSession>.GetPS().SendKeys(ECLSession.CONTINUEPJOB_STR)
When ECLHostPrintSession receives this keystroke, it ignores the print job error condition and continues to process the print job. No ECLPrintJobEvent is fired in acknowledgement of this keystroke.
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 |
public static final int EHPE_PRINT_JOB_STARTED
public static final int EHPE_PRINT_JOB_COMPLETED
public static final int EHPE_PRINT_JOB_ERROR
public static final int EHPE_PRINT_JOB_PRINTER_READY
public static final int EHPE_PRINT_JOB_PRINTER_BUSY
public static final int EHPE_PRINT_JOB_PRINTER_INUSE
public static final int EHPE_PRINT_JOB_PRINTER_CANCELING
public static final int EHPE_PRINT_JOB_STATUS_UPDATE
public static final int EHPE_PRINT_JOB_NO_CODE
public static final int EHPE_PRINT_JOB_ERROR_INTERV_REQUIRED
public static final int EHPE_PRINT_JOB_ERROR_INTERV_PRINTER
public static final int EHPE_PRINT_JOB_ERROR_INTERV_FILE
public static final int EHPE_PRINT_JOB_ERROR_INTERV_LPT
public static final int EHPE_PRINT_JOB_ERROR_PRINTER_NOTFOUND
public static final int EHPE_PRINT_JOB_ERROR_PRINTER_NONE_INSTALLED
public static final int EHPE_PRINT_JOB_ERROR_PRINTER_NOTFOUNDANDLOCKED
public static final int EHPE_PRINT_JOB_ERROR_PRINTER_CHANGETODEFAULT
public static final int EHPE_PRINT_JOB_ERROR_PRINTER_PAPEROUT
public static final int EHPE_PRINT_JOB_ERROR_PRINTER_TIMEDOUT
public static final int EHPE_PRINT_JOB_ERROR_PDT_NOTFOUND
Constructor Detail |
public ECLPrintJobEvent(java.lang.Object source, int type, int code, java.lang.String extraInformation)
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.ECLPrintJobListener
public ECLPrintJobEvent(java.lang.Object source, int type)
source
- Source object that created this event.type
- Value used to identify what type event has occured.ECLPrintJobListener
Method Detail |
public int getEvent()
public int getEventCode()
In the case of a EHPE_PRINT_JOB_STATUS_UPDATE event, this value contains the current page number being printed.
public java.lang.String getEventExtraInformation()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |