Processing commands that interact with sensors in Java

Now that you have understood how to work with the Paho Java Client, its non-blocking API, and its callbacks, we can develop the Java application that will process the commands that interact with sensors, based on the previously explained requirements.

We can start another Maven project in our favorite IDE and make the same edits to the pom.xml file that we did in our previous example to use the Paho Java Client with the Bouncy Castle libraries. In addition, we must include the previously coded SecurityHelper class. The code file for the sample is included in the mqtt_essentials_gaston_hillar_04 folder, in the Java02 folder.

Now, we will create a new class named SensorsManager that implements ...

Get MQTT Essentials - A Lightweight IoT Protocol now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.