diff --git a/.classpath b/.classpath
index 713d7da..609b897 100644
--- a/.classpath
+++ b/.classpath
@@ -5,6 +5,15 @@
-
+
+
+
+
+
+
+
+
+
+
diff --git a/lib/smack/smack.jar b/lib/smack/smack.jar
new file mode 100644
index 0000000..22b9780
Binary files /dev/null and b/lib/smack/smack.jar differ
diff --git a/lib/smack/smackx.jar b/lib/smack/smackx.jar
new file mode 100644
index 0000000..231a9aa
Binary files /dev/null and b/lib/smack/smackx.jar differ
diff --git a/lib/vysper/commons-codec-1.4.jar b/lib/vysper/commons-codec-1.4.jar
new file mode 100644
index 0000000..458d432
Binary files /dev/null and b/lib/vysper/commons-codec-1.4.jar differ
diff --git a/lib/vysper/commons-lang-2.5.jar b/lib/vysper/commons-lang-2.5.jar
new file mode 100644
index 0000000..ae491da
Binary files /dev/null and b/lib/vysper/commons-lang-2.5.jar differ
diff --git a/lib/vysper/mina-core-2.0.2.jar b/lib/vysper/mina-core-2.0.2.jar
new file mode 100644
index 0000000..ca90a4c
Binary files /dev/null and b/lib/vysper/mina-core-2.0.2.jar differ
diff --git a/lib/vysper/nbxml-0.7.jar b/lib/vysper/nbxml-0.7.jar
new file mode 100644
index 0000000..6fff5e1
Binary files /dev/null and b/lib/vysper/nbxml-0.7.jar differ
diff --git a/lib/vysper/slf4j-api-1.6.1.jar b/lib/vysper/slf4j-api-1.6.1.jar
new file mode 100644
index 0000000..42e0ad0
Binary files /dev/null and b/lib/vysper/slf4j-api-1.6.1.jar differ
diff --git a/lib/vysper/slf4j-simple-1.6.1.jar b/lib/vysper/slf4j-simple-1.6.1.jar
new file mode 100644
index 0000000..d894d96
Binary files /dev/null and b/lib/vysper/slf4j-simple-1.6.1.jar differ
diff --git a/lib/vysper/vysper-core-0.7.jar b/lib/vysper/vysper-core-0.7.jar
new file mode 100644
index 0000000..a311013
Binary files /dev/null and b/lib/vysper/vysper-core-0.7.jar differ
diff --git a/lib/vysper/xep0045-muc-0.7.jar b/lib/vysper/xep0045-muc-0.7.jar
new file mode 100644
index 0000000..d05d07c
Binary files /dev/null and b/lib/vysper/xep0045-muc-0.7.jar differ
diff --git a/src/jrummikub/resource/bogus_mina_tls.cert b/src/jrummikub/resource/bogus_mina_tls.cert
new file mode 100644
index 0000000..d34502d
Binary files /dev/null and b/src/jrummikub/resource/bogus_mina_tls.cert differ
diff --git a/src/jrummikub/server/DedicatedServer.java b/src/jrummikub/server/DedicatedServer.java
new file mode 100644
index 0000000..a31c6f5
--- /dev/null
+++ b/src/jrummikub/server/DedicatedServer.java
@@ -0,0 +1,84 @@
+package jrummikub.server;
+
+import java.io.IOException;
+import java.net.InetAddress;
+
+import org.apache.vysper.mina.TCPEndpoint;
+import org.apache.vysper.storage.OpenStorageProviderRegistry;
+import org.apache.vysper.xmpp.addressing.Entity;
+import org.apache.vysper.xmpp.authorization.UserAuthorization;
+import org.apache.vysper.xmpp.modules.extension.xep0045_muc.MUCModule;
+import org.apache.vysper.xmpp.modules.extension.xep0045_muc.storage.InMemoryOccupantStorageProvider;
+import org.apache.vysper.xmpp.modules.extension.xep0045_muc.storage.InMemoryRoomStorageProvider;
+import org.apache.vysper.xmpp.modules.roster.persistence.MemoryRosterManager;
+import org.apache.vysper.xmpp.server.XMPPServer;
+
+@SuppressWarnings("deprecation")
+public class DedicatedServer {
+ String serverPassword;
+ String hostName;
+
+ public DedicatedServer(String serverPassword) {
+ this.serverPassword = serverPassword;
+ try {
+ InetAddress addr = InetAddress.getLocalHost();
+ hostName = addr.getCanonicalHostName();
+ } catch (Exception e) {
+ hostName = "localhost";
+ }
+
+ }
+
+ public String getHostName() {
+ return hostName;
+ }
+
+ public void start() throws Exception {
+ XMPPServer server = new XMPPServer(hostName);
+
+ OpenStorageProviderRegistry providerRegistry = new OpenStorageProviderRegistry();
+ providerRegistry.add(new ServerPasswordAuthorization());
+ providerRegistry.add(new MemoryRosterManager());
+ providerRegistry.add(new InMemoryRoomStorageProvider());
+ providerRegistry.add(new InMemoryOccupantStorageProvider());
+
+ server.setStorageProviderRegistry(providerRegistry);
+ server.addEndpoint(new TCPEndpoint());
+
+ server.setTLSCertificateInfo(
+ getClass().getResource(
+ "/jrummikub/resource/bogus_mina_tls.cert").openStream(),
+ "boguspw");
+
+ server.start();
+ MUCModule muc = new MUCModule("play");
+ server.addModule(muc);
+
+ }
+
+ public class ServerPasswordAuthorization implements UserAuthorization {
+ @Override
+ public boolean verifyCredentials(Entity entity, String password,
+ Object credentials) {
+ return password.equals(serverPassword);
+ }
+
+ @Override
+ public boolean verifyCredentials(String entity, String password,
+ Object credentials) {
+ return password.equals(serverPassword);
+ }
+ }
+
+ public static void main(String[] args) {
+
+ DedicatedServer server = new DedicatedServer("password");
+ System.out.println("Server hostname is " + server.getHostName());
+ try {
+ server.start();
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+
+}