Added simple main class to test embedding of Broker
This commit is contained in:
+17
@@ -0,0 +1,17 @@
|
||||
package org.eclipse.moquette.testembedded;
|
||||
|
||||
import org.eclipse.moquette.server.Server;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
public class EmbeddedLauncher {
|
||||
public static void main(String[] args) throws InterruptedException, IOException {
|
||||
final Server mqttBroker = new Server();
|
||||
mqttBroker.startServer();
|
||||
System.out.println("Broker started");
|
||||
Thread.sleep(1000);
|
||||
System.out.println("Stopping broker");
|
||||
mqttBroker.stopServer();
|
||||
System.out.println("Broker stopped");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user