Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: DKE-Data/agrirouter-sdk-java
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 3.2.2
Choose a base ref
...
head repository: DKE-Data/agrirouter-sdk-java
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 3.3.0
Choose a head ref
  • 3 commits
  • 47 files changed
  • 1 contributor

Commits on Nov 1, 2024

  1. Feature/add dke ping for health messages (#221)

    * Remove Ar2QA and update URLs in QA
    
    Deleted the `Ar2QA` class to eliminate redundancy and adjusted the URL constants in `QA` class to point to the correct QA environment. This streamlines the QA environment handling within the codebase.
    
    * Add support for MQTT communication unit and DKE ping
    
    Introduced MQTT_COMMUNICATION_UNIT in OnboardingResponseRepository and added a corresponding fixture. Updated certification details and added DKE_PING to SystemMessageType for improved system messaging capabilities.
    
    * Add Ping Service implementation
    
    Introduced PingService interface and its implementation, PingServiceImpl, to handle the pinging of health interfaces using MQTT protocol. Created PingParameters class for encapsulating ping request parameters and updated MessageEncoder to support encoding of ping messages. Also added a PingServiceTest class to validate the sending of health messages.
    
    * Correct formatting in AbstractIntegrationTest
    
    Fixed the indentation of the end-private-key line in AbstractIntegrationTest. Also removed unused import statements in PingServiceTest to clean up the code.
    
    * Enable test and update registration code and onboarding response
    
    Re-enabled the `onboardCommunicationUnitAndSaveToFile` test and updated its registration code. Also updated the `communication-unit.json` with new device and authentication details.
    
    * Update farming software JSON and adjust onboarding test
    
    Updated the `farming-software.json` with new device identifiers, connection criteria, and authentication details. Also, modified the test fixture to enable the onboarding test and updated the registration code accordingly.
    
    * Add new onboarding response JSON and update test classes
    
    Added a new `mqtt-communication-unit.json` file for onboarding responses. Corrected the file name reference in `OnboardingResponseRepository` and updated the registration code in the `MqttCommunicationUnitFixture` test case, while also re-enabling the previously disabled test.
    
    * Update telemetry platform onboarding response and test fixture
    
    Replaced telemetry platform onboarding details with new identifiers and updated the registration code in the test fixture. Also, enabled the previously disabled test for onboarding.
    
    * Remove obsolete onboarding responses JSON files
    
    Deleted JSON files for deactivated and removed farming software as well as telemetry platform to clean up outdated resources. These files are no longer needed and have been removed to maintain a leaner project repository.
    
    * Remove obsolete onboarding responses JSON files
    
    Deleted JSON files for deactivated and removed farming software as well as telemetry platform to clean up outdated resources. These files are no longer needed and have been removed to maintain a leaner project repository.
    
    * Refactor MQTT test cases for better integration
    
    Updated `PingServiceTest` to extend `AbstractIntegrationTest` and added necessary imports and services for MQTT testing. Modified `MqttCommunicationUnitFixture` to use MQTT instead of REST and added a logger for message delivery confirmation. Adjusted onboarding response JSON to match the new configuration.
    
    * Enhance MQTT Ping Service tests and fix onboarding fixture
    
    Refactored `PingServiceTest` to include message delivery and arrival checks. Updated `MqttCommunicationUnitFixture` to match the new test structure and modified the registration code in onboarding parameters. This ensures robust message handling and consistency in tests.
    
    * Refactor `PingServiceTest` and enhance message handling.
    
    Refactored the `PingServiceTest` to use instance variables instead of static. Enhance the `messageArrived` method to decode and validate incoming messages, improving test reliability and logging.
    
    * Remove unused imports and exception handling
    
    Removed unused import statements from three test classes to clean up the code. Additionally, eliminated the unnecessary throws declaration in `messageArrived` method in `PingServiceTest.java`.
    
    * Update project version to 3.3.0
    
    Bump the parent project and all sub-modules from version 3.2.1 to 3.3.0. This ensures all modules are aligned with the latest version for consistency.
    
    * Refactor: Change async ping method to throw exception
    
    The `sendAsync` method in `PingServiceImpl` now throws a `RuntimeException`, instructing users to use the synchronous method instead. This change ensures clarity on the method's availability and usage.
    saschadoemer authored Nov 1, 2024
    Configuration menu
    Copy the full SHA
    11f0b31 View commit details
    Browse the repository at this point in the history

Commits on Dec 18, 2024

  1. Update SDK version to 3.3.0 (#225)

    Bump parent POM version from 3.2.2 to 3.3.0 across all modules. This ensures consistency and incorporates the latest changes in the SDK dependencies and features.
    saschadoemer authored Dec 18, 2024
    Configuration menu
    Copy the full SHA
    4bc62e8 View commit details
    Browse the repository at this point in the history

Commits on Dec 19, 2024

  1. Feature/add hivemq client for mqtt services (#224)

    * Add HiveMQ client dependency to Maven project
    
    Introduced the HiveMQ MQTT client (version 1.3.3) to the Maven project dependencies in pom.xml. This addition enables enhanced MQTT communication capabilities alongside the existing Paho client.
    
    * Refactor MQTT client handling
    
    Refactor MQTT client handling by introducing MqttClientWrapper and PahoMqttClientWrapper interfaces. This change encapsulates MQTT client operations, providing better abstraction and sanitizes the exception handling within the PahoMqttClientWrapper. Additionally, updated pom.xml to include the necessary MQTT dependency.
    
    * Refactor MQTT client handling
    
    Introduced MqttClientWrapper and PahoMqttClientWrapper to encapsulate MQTT client operations, improving abstraction and sanitarizing exception handling. This also simplifies the CloudOnboardingServiceImpl class and removes direct dependencies on the Paho MQTT library.
    
    * Update DeleteMessageServiceImpl to use PahoMqttClientWrapper
    
    Replaced direct usage of IMqttClient with PahoMqttClientWrapper for message publishing in DeleteMessageServiceImpl. Also removed unnecessary exception handling and simplified the payload publishing process.
    
    * Refactor MQTT client handling in ListEndpointsServiceImpl.
    
    Replace direct usage of IMqttClient with PahoMqttClientWrapper to improve MQTT client management. Remove the exception handling for MqttException, as it is now managed within the wrapper.
    
    * Refactor MQTT message confirmation handling
    
    Replaced direct use of `IMqttClient` with `PahoMqttClientWrapper` to streamline the client interface and removed unnecessary exception handling. This refactoring simplifies the codebase and improves maintainability by reducing direct dependencies on the Paho client within `MessageConfirmationServiceImpl.java`.
    
    * Refactor MQTT client handling for improved reliability
    
    Replace direct usage of `IMqttClient` with `PahoMqttClientWrapper` across multiple service implementations to streamline error handling and reduce boilerplate code. This includes updating message sending methods to remove redundant try-catch blocks and simplifying message publication.
    
    * Refactor MQTT client integration
    
    Renamed MQTT client classes to a new package and added HiveMQ MQTT client wrapper for improved modularity. Eliminated direct Paho dependencies in MessageQueryHelperService in favor of a unified client wrapper interface. Updated `.gitignore` to include local settings configuration.
    
    * Support HiveMQ MQTT Client in messaging services
    
    Added constructors to various messaging service implementations to support the HiveMQ MQTT client. This increases compatibility and allows for more flexible client configurations. Existing functionality with the Paho MQTT client remains unchanged.
    
    * Rename paho package to client
    
    Renamed MqttOptionService and MqttClientService classes to reflect a more appropriate package name of `client` instead of `paho`. This enhances clarity and consistency throughout the project.
    
    * Add HiveMqttClientService for creating MQTT clients
    
    Introduced HiveMqttClientService to facilitate the creation of MQTT clients using onboarding responses or router devices. This service ensures robust client creation, utilizing provided host, port, and clientId parameters and enforcing necessary validations.
    
    * Add Javadoc comments to MqttClientWrapper interface
    
    Added detailed Javadoc comments to the MqttClientWrapper interface. These comments describe the interface and its publish method, providing clarity on how to use them.
    
    * Add class-level Javadoc comments for MQTT client wrappers
    
    Added detailed Javadoc comments to both PahoMqttClientWrapper and HiveMqttClientWrapper classes. These comments provide an overview of the class functionality and its role in publishing MQTT messages to specified topics, which enhances code readability and maintainability.
    
    * Refactor PingServiceImpl to improve client handling
    
    Refactor the PingServiceImpl to use wrapper classes for different MQTT clients, ensuring better abstraction and flexibility. This change replaces the exception handling mechanism and removes unnecessary imports, thus streamlining the message publishing process.
    
    * Update SDK version to 3.3.0
    
    Upgrade the agrirouter SDK version from 3.2.2 to 3.3.0 across all modules. This includes changes in the parent POM and specific module POMs for tests, convenience, implementation, and API. The update ensures consistency and leverages the new features and fixes in version 3.3.0.
    
    * Add SuppressWarnings annotation to constructor
    
    Added a @SuppressWarnings("unused") annotation to the PingServiceImpl constructor that accepts an Mqtt3AsyncClient parameter. This change addresses potential warnings about unused parameters, enhancing code cleanliness.
    
    * Update GitHub Actions to use latest versions
    
    Upgraded actions/checkout to v4.2.2 and actions/setup-java to v4.5.0 across all workflow steps. This ensures compatibility with the latest features and security enhancements.
    saschadoemer authored Dec 19, 2024
    Configuration menu
    Copy the full SHA
    d209a36 View commit details
    Browse the repository at this point in the history
Loading