Class DispenseCash
java.lang.Object
de.gmxhome.conrad.jpos.jpos_base.JposOutputRequest
de.gmxhome.conrad.jpos.jpos_base.cashchanger.DispenseCash
- All Implemented Interfaces:
Runnable
Output request executor for CashChanger method DispenseCash.
-
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 TypeMethodDescriptioncreateErrorEvent(jpos.JposException ex)
Factory for error events generated from JposExceptions.Factory for status update event with FlagWhenIdle status value.Get cashCounts parameter passed to DispenseCash method.int
Gets CurrentExit property at the time when the request has been created.void
invoke()
Invokes the command.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
-
Constructor Details
-
DispenseCash
Constructor. Stores given parameters for later use.- Parameters:
props
- Property set of device service.cashCounts
- The cashCounts parameter contains the dispensing cash units and counts.
-
-
Method Details
-
getCashCounts
Get cashCounts parameter passed to DispenseCash method.- Returns:
- CashCounts parameter.
-
getCurrentExit
public int getCurrentExit()Gets CurrentExit property at the time when the request has been created.- Returns:
- CurrentExit property.
-
invoke
public void invoke() throws jpos.JposExceptionDescription copied from class:JposOutputRequest
Invokes the command. Must be implemented in derived class. Calls finished() to wake up potentially waiting threads.- Overrides:
invoke
in classJposOutputRequest
- Throws:
jpos.JposException
- JposException thrown by the command to be executed.
-
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.
-
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 classJposOutputRequest
- Returns:
- The resulting status update event.
-