Modifier and Type | Field and Description |
---|---|
static DatabaseActions |
db
DatabaseActions singleton object that makes all the necessary actions between the service and the database,
contains the middle memory for updating the gui and the database and runs the thread that checks periodically
if any of the devices doesn't send data anymore.
|
static UserInterface |
gui
The UserInterface object that contains the graphical user interface.
|
static java.util.Properties |
props
The properties file that contains the initial setup info.
|
static boolean |
running
Boolean variable that shows to the DataBaseActions thread when to stop.
|
Constructor and Description |
---|
Main() |
Modifier and Type | Method and Description |
---|---|
static void |
main(java.lang.String[] args)
Main method that loads the properties from the property file,
creates the DatabaseActions object and starts the thread,
creates a UserInterface object and starts the graphical user interface,
and finally publishes the web service to the url provided by he properties file
This method also contains an anonymous thread that is added a shutdown hook.
|
private static void |
runWhenShuttingDown() |
public static java.util.Properties props
public static DatabaseActions db
public static UserInterface gui
public static boolean running
public static void main(java.lang.String[] args)
args
- Argument given by the user when running the program that contains the path of the property file.private static void runWhenShuttingDown()