Added simple main class to test embedding of Broker

This commit is contained in:
andrea
2015-08-18 23:59:45 +02:00
parent fdbee3a21f
commit b6554eb0ac
4 changed files with 59 additions and 1 deletions
@@ -49,7 +49,7 @@ class ConfigurationParser {
ConfigurationParser(Properties properties) {
this();
for (Entry<Object, Object> entrySet : properties.entrySet()) {
m_properties.put(entrySet.getKey(), entrySet.getValue());
m_properties.put(entrySet.getKey(), entrySet.getValue());
}
}
+40
View File
@@ -0,0 +1,40 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<relativePath>../</relativePath>
<!--<relativePath>../pom.xml</relativePath>-->
<artifactId>moquette-parent</artifactId>
<groupId>org.eclipse.moquette</groupId>
<version>${moquette.version}</version>
</parent>
<artifactId>moquette-embedded-test</artifactId>
<packaging>jar</packaging>
<!--<version>${moquette-version}</version>-->
<name>Moquette - Embedded test</name>
<dependencies>
<dependency>
<groupId>org.eclipse.moquette</groupId>
<artifactId>moquette-broker</artifactId>
<version>0.8-SNAPSHOT</version>
</dependency>
<!--<dependency>-->
<!--<groupId>org.slf4j</groupId>-->
<!--<artifactId>slf4j-log4j12</artifactId>-->
<!--<version>1.6.4</version>-->
<!--</dependency>-->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.8.2</version>
<scope>test</scope>
</dependency>
</dependencies>
</project>
@@ -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");
}
}
+1
View File
@@ -57,6 +57,7 @@
<module>netty_parser</module>
<module>broker</module>
<module>distribution</module>
<module>embedding_moquette</module>
</modules>
<reporting>