Package de.gmxhome.conrad.jpos.jpos_base
Class UpdateFirmware
java.lang.Object
de.gmxhome.conrad.jpos.jpos_base.JposOutputRequest
de.gmxhome.conrad.jpos.jpos_base.UpdateFirmware
- All Implemented Interfaces:
Runnable
Output request executor for common method UpdateFirmware.
-
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
ConstructorsConstructorDescriptionUpdateFirmware(JposCommonProperties props, String firmwareFileName)
Constructor. -
Method Summary
Modifier and TypeMethodDescriptionFactory for output complete events.Common method UpdateFirmware parameter firmwareFileName, see UPOS specification.void
invoke()
Invokes the command.void
setResult(int result)
Sets result of firmware update for the case that updateFirmware throws a JposException.Methods inherited from class de.gmxhome.conrad.jpos.jpos_base.JposOutputRequest
abortCommand, abortCommand, catchedInvocation, clearAll, clearInput, clearOutput, countCommands, createErrorEvent, createIdleEvent, dequeue, enqueue, enqueueSynchronous, finishAsyncProcessing, finished, reactivate, reactivate, reset, run
-
Constructor Details
-
UpdateFirmware
Constructor. Stores given parameters for later use.- Parameters:
props
- Property set of device service.firmwareFileName
- Name of a firmware file or a container file, see UPOS specification.
-
-
Method Details
-
getFirmwareFileName
Common method UpdateFirmware parameter firmwareFileName, see UPOS specification.- Returns:
- Parameter firmwareFileName.
-
setResult
public void setResult(int result) throws jpos.JposExceptionSets result of firmware update for the case that updateFirmware throws a JposException. Must be one of SUE_UF_COMPLETE_DEV_NOT_RESTORED, SUE_UF_FAILED_DEV_OK, SUE_UF_FAILED_DEV_UNRECOVERABLE, SUE_UF_FAILED_DEV_NEEDS_FIRMWARE or SUE_UF_FAILED_DEV_UNKNOWN. Default is SUE_UF_FAILED_DEV_UNKNOWN.
If updateFirmware throws a JposException with ErrorCodeExtended set to one of the allowed values, Result will be set to ErrorCodeExtended internally.
If updateFirmware ends normally, Result will be set to SUE_UF_COMPLETE internally.- Parameters:
result
- Result value as explained above.- Throws:
jpos.JposException
- if result is invalid.
-
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.
-