private void serverInit(Properties configProps) throws IOException { messaging = SimpleMessaging.getInstance(); messaging.init(configProps); m_acceptor = new NettyAcceptor(); m_acceptor.initialize(messaging, configProps); }
public void startServer() throws IOException { ConfigurationParser confParser = new ConfigurationParser(); try { String configPath = System.getProperty("moquette.path", null); confParser.parse(new File(configPath, "config/moquette.conf")); } catch (ParseException pex) { Log.warn("An error occured in parsing configuration, fallback on default configuration", pex); } Properties configProps = confParser.getProperties(); messaging = SimpleMessaging.getInstance(); messaging.init(configProps); m_acceptor = new NettyAcceptor(); m_acceptor.initialize(messaging, configProps); }
public void stopServer() { System.out.println("Server stopping..."); messaging.stop(); m_acceptor.close(); System.out.println("Server stopped"); }
public void stopServer() { log.info("MQTT Server is stopping..."); messaging.stop(); m_acceptor.close(); log.info("MQTT Server has stopped."); }