Class OutputRequest
java.lang.Object
de.gmxhome.conrad.jpos.jpos_base.JposOutputRequest
de.gmxhome.conrad.jpos.jpos_base.fiscalprinter.OutputRequest
- All Implemented Interfaces:
Runnable
- Direct Known Subclasses:
PrintFiscalDocumentLine,PrintFixedOutput,PrintNormal,PrintRecCash,PrintRecItem,PrintRecItemAdjustment,PrintRecItemFuelVoid,PrintRecMessage,PrintRecNotPaid,PrintRecPackageAdjustVoid,PrintRecRefund,PrintRecRefundVoid,PrintRecSubtotal,PrintRecSubtotalAdjustVoid,PrintRecTaxID,PrintRecTotal,PrintRecVoid,PrintRecVoidItem
Output request class for fiscal printers.
-
Nested Class Summary
Nested classes/interfaces inherited from class de.gmxhome.conrad.jpos.jpos_base.JposOutputRequest
JposOutputRequest.JposRequestThread -
Field Summary
FieldsModifier and TypeFieldDescriptionintError level.intFiscal Printer error station.Fields inherited from class de.gmxhome.conrad.jpos.jpos_base.JposOutputRequest
Abort, AdditionalData, Device, EndSync, Exception, Finished, OutputID, Props, Waiting -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateErrorEvent(jpos.JposException ex)Error event creator.Factory for status update event with FlagWhenIdle status value.voidinvoke()This function should be called whenever a printing method has been invoked.static SyncObjectsetIdleWaiter(JposDevice dev)Sets SyncObject to be signalled when device becomes idle.Methods inherited from class de.gmxhome.conrad.jpos.jpos_base.JposOutputRequest
abortCommand, abortCommand, catchedInvocation, clearAll, clearInput, clearOutput, countCommands, createOutputEvent, dequeue, enqueue, enqueueSynchronous, finishAsyncProcessing, finished, reactivate, reactivate, reset, run
-
Field Details
-
Station
public int StationFiscal Printer error station. This value will be passed to the ErrorStation property in error case during asynchronous processing. Default value: The same station as specified by FiscalReceiptStation. -
Level
public int LevelError level. This value will be passed to the ErrorLevel property in error case during asynchronous processing. Default value: EL_RECOVERABLE.
-
-
Constructor Details
-
OutputRequest
Constructor. Stores default values for Level and Station for later use.- Parameters:
props- Property set of device service.
-
-
Method Details
-
createErrorEvent
Error event creator. Level and Station will be taken from this object and State from PrinterState of the property set unless the given exception is a FiscalPrinterException. In the latter case, Level, Station and State will be taken from the exception. OutputID will always be taken from this object.- Overrides:
createErrorEventin classJposOutputRequest- Parameters:
ex- JposException which is the originator of an error event.- Returns:
- FiscalPrinterErrorEvent with values from exception and corresponding
-
createIdleEvent
Description copied from class:JposOutputRequestFactory for status update event with FlagWhenIdle status value. Must be overwritten whenever a device specific status update event shall be created.
If the createErrorEvent method has been overwritten with a method that returns an error event with source = null to enforce special error handling via result properties instead of error events, createIdleEvent must be overwritten as well.- Overrides:
createIdleEventin classJposOutputRequest- Returns:
- The resulting status update event.
-
invoke
public void invoke() throws jpos.JposExceptionThis function should be called whenever a printing method has been invoked. Therefore, it is the perfect place to signal processing has finished to implicitly waiting synchronous methods.- Overrides:
invokein classJposOutputRequest- Throws:
jpos.JposException- If the invoked method throws an exception.
-
setIdleWaiter
Sets SyncObject to be signalled when device becomes idle.- Parameters:
dev- Device to be used.- Returns:
- SyncObject to wait for idle, if not idle. null if device is idle.
-