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

public class OutputRequest extends JposOutputRequest
Output request class for fiscal printers.
  • Field Details

    • Station

      public int Station
      Fiscal 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 Level
      Error level. This value will be passed to the ErrorLevel property in error case during asynchronous processing. Default value: EL_RECOVERABLE.
  • Constructor Details

    • OutputRequest

      public OutputRequest(FiscalPrinterProperties props)
      Constructor. Stores default values for Level and Station for later use.
      Parameters:
      props - Property set of device service.
  • Method Details

    • createErrorEvent

      public JposErrorEvent createErrorEvent(jpos.JposException ex)
      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:
      createErrorEvent in class JposOutputRequest
      Parameters:
      ex - JposException which is the originator of an error event.
      Returns:
      FiscalPrinterErrorEvent with values from exception and corresponding
    • createIdleEvent

      public JposStatusUpdateEvent createIdleEvent()
      Description copied from class: JposOutputRequest
      Factory 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:
      createIdleEvent in class JposOutputRequest
      Returns:
      The resulting status update event.
    • invoke

      public void invoke() throws jpos.JposException
      This 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:
      invoke in class JposOutputRequest
      Throws:
      jpos.JposException - If the invoked method throws an exception.
    • setIdleWaiter

      public static SyncObject setIdleWaiter(JposDevice dev)
      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.