Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
f132ca9602
5
.idea/misc.xml
generated
5
.idea/misc.xml
generated
@ -1,7 +1,10 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<project version="4">
|
<project version="4">
|
||||||
<component name="ExternalStorageConfigurationManager" enabled="true" />
|
<component name="ExternalStorageConfigurationManager" enabled="true" />
|
||||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_13" project-jdk-name="13" project-jdk-type="JavaSDK">
|
<component name="JavaScriptSettings">
|
||||||
|
<option name="languageLevel" value="ES6" />
|
||||||
|
</component>
|
||||||
|
<component name="ProjectRootManager" version="2" languageLevel="JDK_11" project-jdk-name="11" project-jdk-type="JavaSDK">
|
||||||
<output url="file://$PROJECT_DIR$/out" />
|
<output url="file://$PROJECT_DIR$/out" />
|
||||||
</component>
|
</component>
|
||||||
</project>
|
</project>
|
@ -35,6 +35,7 @@ public class main {
|
|||||||
}
|
}
|
||||||
}).start();
|
}).start();
|
||||||
|
|
||||||
|
|
||||||
//startup web server
|
//startup web server
|
||||||
Thread mythread = new Thread(() -> new Webserver().startserver());
|
Thread mythread = new Thread(() -> new Webserver().startserver());
|
||||||
mythread.start();
|
mythread.start();
|
||||||
@ -46,9 +47,7 @@ public class main {
|
|||||||
mqtt m = new mqtt();
|
mqtt m = new mqtt();
|
||||||
m.notifymessage();
|
m.notifymessage();
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
Log.debug("An error was happened in the class mqtt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -33,7 +33,7 @@ public class mqtt {
|
|||||||
client.connect(connOpts);
|
client.connect(connOpts);
|
||||||
|
|
||||||
} catch (MqttException e) {
|
} catch (MqttException e) {
|
||||||
e.printStackTrace();
|
Log.error("Connection to the ESB was failes");
|
||||||
}
|
}
|
||||||
|
|
||||||
mqttreceiver mr = new mqttreceiver(client);
|
mqttreceiver mr = new mqttreceiver(client);
|
||||||
@ -56,7 +56,7 @@ public class mqtt {
|
|||||||
try {
|
try {
|
||||||
Database = JDCB.getInstance();
|
Database = JDCB.getInstance();
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
//e.printStackTrace();
|
Log.error("No Connection to the databank");
|
||||||
}
|
}
|
||||||
//new JDCB("placeuser", "eaL956R6yFItQVBl", "wasteinformation");
|
//new JDCB("placeuser", "eaL956R6yFItQVBl", "wasteinformation");
|
||||||
ResultSet result = Database.executeQuery(message);
|
ResultSet result = Database.executeQuery(message);
|
||||||
@ -92,8 +92,7 @@ public class mqtt {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (SQLException e) {
|
} catch (SQLException e) {
|
||||||
System.out.println("Exception");
|
Log.error("No data from databank");
|
||||||
e.printStackTrace();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -120,8 +119,5 @@ public class mqtt {
|
|||||||
String split[] = temp.split("/");
|
String split[] = temp.split("/");
|
||||||
String newDate = split[2] + "." + split[1] + "." + split[0];
|
String newDate = split[2] + "." + split[1] + "." + split[0];
|
||||||
return newDate;
|
return newDate;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -45,7 +45,7 @@ Log.error("connection lost");
|
|||||||
client.subscribe("TopicIn");
|
client.subscribe("TopicIn");
|
||||||
Log.debug("subscribed topic");
|
Log.debug("subscribed topic");
|
||||||
} catch (MqttException e) {
|
} catch (MqttException e) {
|
||||||
e.printStackTrace();
|
Log.error("Connection to the ESB was failed");
|
||||||
}
|
}
|
||||||
return message;
|
return message;
|
||||||
}
|
}
|
||||||
|
@ -36,7 +36,6 @@ public class mqtttransmitter {
|
|||||||
Log.debug("loc " + me.getLocalizedMessage());
|
Log.debug("loc " + me.getLocalizedMessage());
|
||||||
Log.debug("cause " + me.getCause());
|
Log.debug("cause " + me.getCause());
|
||||||
Log.debug("excep " + me);
|
Log.debug("excep " + me);
|
||||||
me.printStackTrace();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user