Class DisplayText
java.lang.Object
de.gmxhome.conrad.jpos.jpos_base.JposOutputRequest
de.gmxhome.conrad.jpos.jpos_base.linedisplay.DisplayText
- All Implemented Interfaces:
Runnable
Output request executor for LineDisplay method DisplayText.
-
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
ConstructorsConstructorDescriptionDisplayText(LineDisplayProperties props, String data, int attribute)
Constructor. -
Method Summary
Modifier and TypeMethodDescriptioncreateErrorEvent(jpos.JposException e)
Factory for error events generated from JposExceptions.Factory for status update event with FlagWhenIdle status value.Factory for output complete events.getData()
LineDisplay method DisplayText parameter data, converted to an array of Object with LineDisplayService method outputDataParts.int
LineDisplay property CurrentWindow, see UPOS specification.void
invoke()
Invokes the command.Methods inherited from class de.gmxhome.conrad.jpos.jpos_base.JposOutputRequest
abortCommand, abortCommand, catchedInvocation, clearAll, clearInput, clearOutput, countCommands, dequeue, enqueue, enqueueSynchronous, finishAsyncProcessing, finished, reactivate, reactivate, reset, run
-
Constructor Details
-
DisplayText
Constructor. Stores given parameters for later use.- Parameters:
props
- Property set of device service.data
- Display data, see UPOS specification, method DisplayText.attribute
- Text attributes, see UPOS specification, method DisplayText.
-
-
Method Details
-
getWindow
public int getWindow()LineDisplay property CurrentWindow, see UPOS specification.- Returns:
- LineDisplayService property CurrentWindow.
-
getData
LineDisplay method DisplayText parameter data, converted to an array of Object with LineDisplayService method outputDataParts.- Returns:
- Array of LineDisplayService.DisplayDataPart objects representing display data and attributes contained in DisplayText parameter data and attribute.
-
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.
-
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:
e
- JposException which is the originator of an error event.- Returns:
- The resulting error event.
-
createOutputEvent
Description copied from class:JposOutputRequest
Factory for output complete events. Must be overwritten whenever a device specific output complete event shall be created.- Overrides:
createOutputEvent
in classJposOutputRequest
- Returns:
- The resulting output complete event or null if no output complete event shall be enqueued.
-
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.
-