...
The above example will simply print out the Device ID, as well as the Property name, value, and type, whenever the Property changes.
Shutdown
To perform a graceful shut down of the GatewayClient, allowing for all subsystems to save any critical data and release system resources, such as file handles, open ports, user threads, you must call the shutdown() method. Since the GatewayClient creates user threads, not performing a shutdown may keep the JVM running even after your application has exited.
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
...
gw.shutdown();
... |
See the GatewayClient API for more details.
Conclusion
This programming guide has shown how to initialize a GatewayClient, join devices, get their properties, and interact with them in a simple way.
...