Guest User

Untitled

a guest
Mar 4th, 2013
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.07 KB | None | 0 0
  1.  
  2. public class ServerMain {
  3.  
  4. /**
  5. * boots the server as a standalone application according to the spring-config.xml file
  6. * found on the classpath
  7. * @param args
  8. */
  9. public static void main(String[] args) {
  10.  
  11. // new ClassPathXmlApplicationContext("spring-config.xml");
  12.  
  13. OpenStorageProviderRegistry providerRegistry = new OpenStorageProviderRegistry();
  14.  
  15. providerRegistry.add(new DummyAuthorization());
  16. providerRegistry.add(new MemoryRosterManager());
  17. providerRegistry.add(new SimpleAccountCreation());
  18.  
  19. XMPPServer server = new XMPPServer("swarm.cs.pub.ro");
  20. server.addEndpoint(new TCPEndpoint());
  21. //server.addEndpoint(new StanzaSessionFactory());
  22. server.setStorageProviderRegistry(providerRegistry);
  23.  
  24. try {
  25. server.setTLSCertificateInfo(new File("../config/bogus_mina_tls.cert"), "boguspw");
  26. } catch (Exception e) {
  27. e.printStackTrace();
  28. }
  29.  
  30. try {
  31. server.start();
  32. } catch (Exception e) {
  33. e.printStackTrace();
  34. }
  35. }
  36. }
Advertisement
Add Comment
Please, Sign In to add comment