Class RotatePrint
java.lang.Object
de.gmxhome.conrad.jpos.jpos_base.JposOutputRequest
de.gmxhome.conrad.jpos.jpos_base.posprinter.OutputRequest
de.gmxhome.conrad.jpos.jpos_base.posprinter.RotatePrint
- All Implemented Interfaces:
Runnable
Output request executor for POSPrinter method RotatePrint.
-
Nested Class Summary
Nested classes/interfaces inherited from class de.gmxhome.conrad.jpos.jpos_base.JposOutputRequest
JposOutputRequest.JposRequestThread
-
Field Summary
FieldsModifier and TypeFieldDescriptionList holds all outstanding output requests.Fields inherited from class de.gmxhome.conrad.jpos.jpos_base.JposOutputRequest
Abort, AdditionalData, Device, EndSync, Exception, Finished, OutputID, Props, Waiting
-
Constructor Summary
ConstructorsConstructorDescriptionRotatePrint(JposCommonProperties props, int station, int rotation)
Constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addMethod(OutputRequest request)
Adds an output request to the request queue.int
POSPrinter method RotatePrint parameter rotation, see UPOS specification.int
POSPrinter method RotatePrint parameter station, see UPOS specification.void
invoke()
Invokes the command.Methods inherited from class de.gmxhome.conrad.jpos.jpos_base.posprinter.OutputRequest
createErrorEvent, createIdleEvent
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
-
SidewaysCommands
List holds all outstanding output requests.
-
-
Constructor Details
-
RotatePrint
Constructor. Stores given parameters for later use.- Parameters:
props
- Property set of device service.station
- The printer station to be used. May be either S_RECEIPT or S_SLIP.rotation
- Direction of rotation. One of RP_RIGHT90, RP_LEFT90 or RP_ROTATE180, optionally ORed with one of RP_BARCODE or RP_BITMAP, or RP_NORMAL.
-
-
Method Details
-
getStation
public int getStation()POSPrinter method RotatePrint parameter station, see UPOS specification.- Returns:
- RotatePrint parameter station.
-
getRotation
public int getRotation()POSPrinter method RotatePrint parameter rotation, see UPOS specification.- Returns:
- RotatePrint parameter rotation.
-
addMethod
Adds an output request to the request queue.- Parameters:
request
- Request to be enqueued.- Throws:
jpos.JposException
- if request is null (specifying synchronous method implementation).
-
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.
-