Package de.gmxhome.conrad.jpos.jpos_base
Class UnitOutputRequest
java.lang.Object
de.gmxhome.conrad.jpos.jpos_base.JposOutputRequest
de.gmxhome.conrad.jpos.jpos_base.UnitOutputRequest
- All Implemented Interfaces:
Runnable
- Direct Known Subclasses:
BumpBarSound
,ClearVideo
,PositionBase
,RestoreVideoRegion
,TransactionDisplay
,VideoSound
Output request class for subsystem unit devices.
-
Nested Class Summary
Nested classes/interfaces inherited from class de.gmxhome.conrad.jpos.jpos_base.JposOutputRequest
JposOutputRequest.JposRequestThread
-
Field Summary
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 TypeMethodDescriptionprotected void
Checks whether all units specified by Units are online.void
Removes all pending and suspended output requests belonging to the property set of the command.createErrorEvent(jpos.JposException ex)
Factory for error events generated from JposExceptions.int
getUnits()
Retrieves parameter units of all subsystem unit device methods using OutputRequest for processing.Methods inherited from class de.gmxhome.conrad.jpos.jpos_base.JposOutputRequest
abortCommand, abortCommand, catchedInvocation, clearAll, clearInput, countCommands, createIdleEvent, createOutputEvent, dequeue, enqueue, enqueueSynchronous, finishAsyncProcessing, finished, invoke, reactivate, reactivate, reset, run
-
Constructor Details
-
UnitOutputRequest
Constructor. Stores given parameters for later use.- Parameters:
props
- Property set of device service.units
- Units where status has been changed.
-
-
Method Details
-
getUnits
public int getUnits()Retrieves parameter units of all subsystem unit device methods using OutputRequest for processing. See UPOS specification of the specific method for further information.- Returns:
- Value of method parameter units.
-
createErrorEvent
Description copied from class:JposOutputRequest
Factory for error events generated from JposExceptions. Must be overwritten whenever a device specific error event shall be created. For example, in case of cash printer methods, this method should return a POSPrinterErrorEvent (which is an object derived from JposErrorEvent) that contains additional values to be stored in printer properties before the event will be fired.
If a device supports result code properties instead of error events, this method must return null. The result codes should be buffered for a later call of the createIdleEvent method which must create a device specific StatusUpdateEvent which contains the buffered values.
If null will be returned instead of a JposErrorEvent, it will enforce special request handling instead:- Instead of suspending the request, it will be finished.
- The idle flag will be set.
- Overrides:
createErrorEvent
in classJposOutputRequest
- Parameters:
ex
- JposException which is the originator of an error event.- Returns:
- The resulting error event.
-
clearOutput
public void clearOutput()Description copied from class:JposOutputRequest
Removes all pending and suspended output requests belonging to the property set of the command. Clears only those requests that are really output requests:- Have an own OutputID,
- Generate an OutputCompleteEvent when finished,
- Generate error events with locus EL_OUTPUT.
- Overrides:
clearOutput
in classJposOutputRequest
-
checkUnitsOnline
protected void checkUnitsOnline() throws jpos.JposExceptionChecks whether all units specified by Units are online.- Throws:
jpos.JposException
- If not all specified units are online.
-