PIOT-GDA-02-001: Create or just review the GDA application wrapper - GatewayDeviceApp #49
Labels
exercise
New feature to implement as an exercise
Milestone
Description
GatewayDeviceApp
.Review the README
Estimated effort may vary greatly
Actions
NOTE: The implementation examples depicted here are only one way to implement the requirements listed. Your own implementation may vary of course.
programmingtheiot\gda
source folder namedapp
and navigate to that folder.java.util.logging
logging framework. You can import all, or justLevel
andLogger
.public GatewayDeviceApp(String[] args)
stopApp(int code)
method, and log an info message indicating the app was stopped. Include atry / catch
block to handle the stop code. On exception, log an error message along with the stack trace. Outside of thetry / catch
block, and as the last line of code, log an informational message with thecode
included.startApp()
method, and log an info message indicating the app was started. Include atry / catch
block to handle the start code. On exception, log an error message along with the stack trace, then callstopApp(-1)
.initConfig(String fileName)
method, and log an info message indicating the method was called. It will mostly remain empty for now.parseArgs(String[] args)
method, and log an info message indicating the method was called. For now, the args can be ignored. Before the method exits, callinitConfig(null)
.parseArgs(args)
.public static void main(String[] args)
method to enable running as an application. It will create an instance ofGatewayDeviceApp
, callstartApp()
, wait 65 seconds, then callstopApp(0)
, as follows:Estimate
Tests
Integration tests (in ./src/test/java/programmingtheiot/part01/integration)
The text was updated successfully, but these errors were encountered: