October 2018
Intermediate to advanced
556 pages
15h 18m
English
We may now outline the design of our system in the following diagram:

In this use case, the domain model will consist only of the Temperature class with the only double value inside. For simplicity purposes, it is also used as an event object, as shown in the following code:
final class Temperature { private final double value; // constructor & getter...}
To simulate the sensor, let's implement the TemperatureSensor class and decorate it with a @Component annotation to register the Spring bean, as follows:
@Componentpublic class TemperatureSensor { private ...