Releases: mjpcger/JavaPOS-SPF
Support for Additional Device Classes, Bug Fixes, Quality Enhancements and new Samples
Enhanced quality of coding by checking and removing all reasons for compiler warnings. Use of @SuppressWarnings where other solution is not possible.
Code compatibility level for Java 1.8 now. Especially lambdas and try-with-resource used frequently.
Jpos116Dummy.jar will not be necessary any longer because JavaPOS 1.16 implementations are available via maven snapshots now (javapos-contracts, javapos-controls). Therefore, it has been removed from distribution.
Several bugs have been fixed. Several enhancements have been made:
- Support for the following device classes has been added: DeviceMonitor, GestureControl, IndividualRecognition, SoundPlayer, SoundRecorder, SpeechSynthesis, VideoCapture and VoiceRecognition.
- Many possible deadlocks will be avoided now by catching unexpected Throwable objects instead of only JposExceptions or Exceptions in internal worker threads.
- Use of import static statements to allow easier use of constants and static methods.
- Support for concurrent asynchronous processing has been added, on a per-device-service or per-request basis.
- Enhanced configuration abilities via method checkProperties, added to class JposCommonProperties.
- Enhanced deprecation check: If control version is less than service version, the service will not generate JposException with E_DEPRETATED, even if the service is 2 minor releases after the specification declared a method as deprecated if the control version is not 2 minor releases after deprecation.
- Enhanced event handling options:
- Strict UPOS conformance (enqueued data events will block any event enqueued later, even if DataEventEnabled is false.
- Maximum confirmation waiting time for events that need confirmation via event handler.
Upgrade to JavaPOS 1.16, Support For All Device Classes Specified in UPOS 1.15, Several Bug Fixes And Enhancements
This release is based on the upcoming JavaPOS release 1.16. A jar file Jpos116Dummy.jar will be provided within this package and should be present in the class path before the JavaPOS 1.15 jar file as long as no official jar file is available for JavaPOS 1.16.
This is the first version that supports all device classes specified in JavaPOS 1.15. In addition, the implementation for device classes Lights and POSPower support new properties and methods as specified in UnifiedPOS Retail Peripheral Architecture, Version 1.16.1 RCSD (can be downloaded on the OMG web site here). If a service implementation based on JavaPOS-SPF neither supports device class Lights nor POSPower, Jpos116Dummy.jar will not be needed.
The following enhancements have been made:
- Support for device class PointCardRW. Even if not changed in JavaPOS 1.16, usage of Jpos116Dummy.jar allows to use JPOS_TRUE and JPOS_FALSE for property CapCardEntranceSensor. These constants should be added to the next JavaPOS version as workaround for a design error in the PointCardRW device class.
- Support for secure socket client objects has been added, inclusive embedded logging support as previously supported for communications via TCP, UDP or serial (COM port).
- Event handling has been changed to allow to follow strictly the FIFO principle by setting StrictFIFOEventHandling to true in jpos.xml. If false or not specified, DataEvent and input ErrorEvent events will not block event handling if DataEventEnabled is false.
- Enhanced validation of output data in POSPrinter and LineDisplay devices.
- All device classes where currency values will be passed in String objects use the semantically correct string values now. This means, a currency value of 1.23, stored in a long variable as 12300, will (and must) be passed as "1.23" or "1.2300", not as "12300" whenever passed in a String. To support applications or service objects which pass (and expect) the internal representation, "12300" in Strings, two wrapper classes have been provided for the FiscalPrinter device class: Class FiscalPrinterToIntegerWrapper can be used in cases where the application uses the decimal string representation, but the service object uses the internal representation. Class FiscalPrinterToDecimalWrapper can be used whenever the application uses the internal string string representation, but the service object uses the representation with decimal strings. Keep in mind that the FiscalPrinter device class is the only known device class where internal representation of currency values in strings has been used in past.
Support for Additional Device Class, Bug Fixes and new Sample
Support for device class PINPad has been added to this release.
Some important bug fixes have been made:
- The methods in the interface classes for the following device classes have been made public: Biometrics, CheckScanner, ImageScanner, ItemDispenser, Lights, POSPower, RFIDScanner, SignatureCapture and SmartCardRW.
- SynchronizedMessageBox crashed whenever a previous message box generated with the same SynchronizedMessageBox instance had been closed with method abortDialog.
- Several bug fixes in JavaDoc comments.
- Class factory for device class SmartCardRW and RFIDScanner did not create a new service instance whenever an instance for the same device ID existed.
- Class factory for all device classes call the device class specific method changeDefaults before calling method addproperties now. This has been made to ensure that an exception within the class factory does not leave a non-working service in memory.
Support for Additional Device Classes, Bug Fixes and new Samples
This release contains support for device classes HardTotals, RFIDScanner and SmartCardRW. New samples for these device classes have been added to module SampleDummyDevice and SampleHardTotals.
While SampleHardTotals consists of a potentially useful implementation based on files with synchronously write access, the samples for RFIDScanner and SmartCardRW have only been implemented to be able to perform interface tests. They do not use any I/O with some kind of simulator, the corresponding services use message boxes instead to simulate several status changes.
A new class SynchronizedMessageBox has been added. In can be used to generate non-modal message boxes in foreground from any thread. This class will be used especially by the samples for RFIDScanner and SmardCardRW. In addition, method synchronizedMessageBox of class JposBaseDevice has been changed to use use class SynchronizedMessageBox as well now.
Method JposBaseDevice.getCount made public to allow service implementations to access the number of active instances of a device class.
Use of JavaPOS-SPF internal FiscalPrinter property AllowItemAdjustmentTypesInPackageAdjustment has been made deprecated because the corresponding constants for package adjustments have been added to class FiscalPrinterConst in JavaPOS version 1.15.
Some important bug fixes have been made:
- Method Open has been changed. Whenever a service had been created successful by the class factory, but threw an exception before finishing, the service instance was left in an undefined state. This could lock the service for further use until restart of the application. Now, any exception thrown within method open results in a cleanup.
- If a device had been claimed by another instance, method claim threw a JposException with error code E_CLAIMED immediately in previous versions. This behavior is not correct. Now, method claim waits always until either the device has been released or the maximum time has been expired. A JposException with error code E_CLAIMED will only be thrown if the device has just been claimed (by the same instance).
Maintenance Release for JavaPOS-SPF 2.0.0
This is a maintenance release for version 2.0.0. It has been released because some useless workarounds for errors in JavaPOS 1.14 are still present in 2.0.0 and have been removed now.
Upgrade to JavaPOS 1.15, Several Enhancements And Bug Fixes, Support For More Device Classes
This release is based on JavaPOS 1.15. Keep in mind that the standardization organization for the UPOS standard has been changed: Now, OMG (the Object Management Group) provides the specific documentation for UPOS 1.15. Since all service implementations have been updated to be derived from the corresponding jpos interface of version 1.15, JavaPOS-SPF version 2 will no longer work with JavaPOS 1.14 or earlier.
Logging via Log4j has been removed because the previously used version of Log4j is no longer supported and instead of changing to a newer release, I decided to change to a self-written wrapper based on java.util.logging. Therefore, there are some new restrictions for logging configuration, for more details and to get the necessary sources and / or binaries, visit Log4pos.
The method how asynchronous method calls are handled has been unified. It works the same for asynchronous Scale class methods and common methods as for all other methods now.
Enhancements for DirectIOEvent handling has been made: The new method postDirectIOProcessing is available now. It can be used to inform the service about reactions to be requested by the application via changes of event properties.
Support for device class ElectronicValueRW, inclusive support for the new TransitionEvent, has been added. TransitionEvent handling and integration of the CAT class into the ElectronicValueRW class were the major reasons for adding this device class. The ElectronicValueRW simulator is fully compatible with the CAT simulator (there are only two additional plausibility checks that could lead to a hang up in the CAT simulator) and it can be used to test the CAT sample as well as the ElectronicValueRW sample. However, this sample can only be used as a sample for ElectronicValueRW services of type CAT. For the other service types, currently no sample is available.
Since missing constants have been added to JavaPOS 1.15, setting specific values for FPTR_AT_DISCOUNT or FPTR_AT_SURCHARGE is no longer supported. However, since currently written applications might use item adjustment type values instead whenever calling package adjustment methods, the ability to specify boolean property AllowItemAdjustmentTypesInPackageAdjustment in jpos.xml is still present.
Support for Additional Devices, Bug Fixes and Extended Sample
This release contains support for device classes Belt, BillAcceptor, BillDispenser, CashChanger and CoinAcceptor. The Udp device sample has been reworked, the new version still supports drawer, but support for belt and a cash box has been added and the new interface for drawer is incompatible to previous versions.
The belt part has been added to demonstrate the ability to handle a Belt device.
The cashbox part has been added to demonstrate the ability to interpret it as one CashChanger device or as a bundle consisting of a BillAcceptor, a BillDispenser, a CoinAcceptor and a CoinDispenser (however, to keep it not too complex, CoinAcceptor and BillAcceptor cannot be claimed simultaneously). In addition, this bundle and the CashChanger cannot be used simultaneously as well.
Some bug fixes have been made. Most important:
- Udp processors corrected (flush methods sometimes did not clear the latest message read),
- Belt and BumpBar factories used wrong property set lists whenever creating a new service instance,
- The readCashCounts method of the CoinDispenserService class no longer checks the contents of a given cashCounts parameter before calling the device specific implementation.
- Several getter for Object type properties have been changed to return a clone of the original property to avoid changes of the original properties.
- CopyEvent methods removed for StatusUpdateEvent implementations of non-shareable devices because it will never be used by the framework.
- Specific constructors have been added to StatusUpdateEvent implementations of shareable devices that makes implementation of copyEvent easier for StatusUpdateEvent objects that contain private menbers.
For more details, see the commit comments from December 2020 and January 2021.
Support for Additional Devices, Bug Fixes and New Samples
This release contains support for the POSPower device class. A sample device service for POSPower has been added. It uses the Win32 kernel function GetSystemPowerStatus and shutdown.exe to simulate a POSPower device on Windows laptop or tablet devices.
A UDP processor class designed especially for UDP clients is available now. The current implementation of the UDP IO processor has been rewritten on base of the UDP client processor class to avoid licensing problems.
A sample UDP cash drawer service that can be used to test UDP IO processors has been added.
Some bug fixes have been made.
The (inline) documentation of sample device services will contain much more useful information. At least, all configuration opportunities will be described.
New Version with support for additional device classes
This release is a big step forward to a better framework, supporting development of JavaPOS device services easier as before. However, there are some incompatibilities to version 1.0:
- The API for RemoteOrderDisplay has been changed. A new abstraction layer has been added to allow simple implementation for all devices that support a sub-system of up to 32 units in a way similar to remote order displays. This is the case for device class BumpBar.
- Some structural changes might need recompilation. This might be the case for implementations that use class SerialIOAdapter. In addition, it might be necessary to add further jar files to the class path because support for serial IO has been extracted to jar files that can be used independently from JavaPOS-SPF for other projects that use serial IO.
- Support for Linux (and perhaps other Unix-like operating systems) has been added.
Bug fix release
A lot of bugs have been fixed which could be found with the new test tool JavaPOS-SPF-Test. In addition, version 1.0.1 will be distributed as binary release as well.
JavaDoc is available now here and contains descriptions for the framework as well as for all sample implementations.