mqttfertig
This commit is contained in:
parent
8810b1dcae
commit
660207485a
@ -6,11 +6,8 @@ import com.wasteinformationserver.website.Webserver;
|
||||
|
||||
public class main {
|
||||
public static void main(String[] args) {
|
||||
/*
|
||||
com.wasteinformationserver.Date D=new com.wasteinformationserver.Date();
|
||||
D.getdata();
|
||||
D.printList();
|
||||
*/
|
||||
|
||||
|
||||
|
||||
Runtime.getRuntime().addShutdownHook(new Thread(() -> {
|
||||
try {
|
||||
@ -28,9 +25,8 @@ public class main {
|
||||
|
||||
Log.message("thread started");
|
||||
|
||||
// mqtt m = new mqtt();
|
||||
// m.notifymessage();
|
||||
// m.getDatabasedata();
|
||||
mqtt m = new mqtt();
|
||||
m.notifymessage();
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -107,9 +107,10 @@ public class mqtt {
|
||||
}
|
||||
|
||||
|
||||
private void transmitmessageAbfallart(String tempabfallart) {
|
||||
private void transmitmessageAbfallart(String temp) {
|
||||
|
||||
mqtttransmitter mt = new mqtttransmitter();
|
||||
mt.sendmessage(tempabfallart);
|
||||
System.out.println(temp);
|
||||
mt.sendmessage(temp);
|
||||
}
|
||||
}
|
@ -39,7 +39,7 @@ public class mqtttransmitter {
|
||||
System.out.println("Message published");
|
||||
sampleClient.disconnect();
|
||||
System.out.println("Disconnected");
|
||||
System.exit(0);
|
||||
|
||||
|
||||
} catch (MqttException me) {
|
||||
System.out.println("reason " + me.getReasonCode());
|
||||
|
Loading…
x
Reference in New Issue
Block a user