Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class ServerMain {
- /**
- * boots the server as a standalone application according to the spring-config.xml file
- * found on the classpath
- * @param args
- */
- public static void main(String[] args) {
- // new ClassPathXmlApplicationContext("spring-config.xml");
- OpenStorageProviderRegistry providerRegistry = new OpenStorageProviderRegistry();
- providerRegistry.add(new DummyAuthorization());
- providerRegistry.add(new MemoryRosterManager());
- providerRegistry.add(new SimpleAccountCreation());
- XMPPServer server = new XMPPServer("swarm.cs.pub.ro");
- server.addEndpoint(new TCPEndpoint());
- //server.addEndpoint(new StanzaSessionFactory());
- server.setStorageProviderRegistry(providerRegistry);
- try {
- server.setTLSCertificateInfo(new File("../config/bogus_mina_tls.cert"), "boguspw");
- } catch (Exception e) {
- e.printStackTrace();
- }
- try {
- server.start();
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment