Ejemplo n.º 1
0
  private void serverInit(Properties configProps) throws IOException {
    messaging = SimpleMessaging.getInstance();
    messaging.init(configProps);

    m_acceptor = new NettyAcceptor();
    m_acceptor.initialize(messaging, configProps);
  }
Ejemplo n.º 2
0
  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);
  }