Package com.almende.eve.config

Examples of com.almende.eve.config.Config


            + "Trying default filename '" + filename + "'.");
      }
      String fullname = "/WEB-INF/" + filename;
      logger.info("loading configuration file '"
          + getServletContext().getRealPath(fullname) + "'...");
      Config config = new Config(getServletContext().getResourceAsStream(
          fullname));
      agentFactory = AgentHost.getInstance();
      agentFactory.loadConfig(config);
    }
  }
View Full Code Here


          "Trying default filename '" + filename + "'.");
      }
      String fullname = "/WEB-INF/" + filename;
      logger.info("loading configuration file '" +
          getServletContext().getRealPath(fullname) + "'...");
      Config config = new Config(getServletContext().getResourceAsStream(fullname));
     
      // TODO: create the agentFactory in a synchronized way
      agentFactory = AgentFactory.createInstance();
      agentFactory.setStateFactory(config);
      agentFactory.addTransportServices(config);
View Full Code Here

          "Trying default filename '" + filename + "'.");
      }
      String fullname = "/WEB-INF/" + filename;
      logger.info("loading configuration file '" +
          getServletContext().getRealPath(fullname) + "'...");
      Config config = new Config(getServletContext().getResourceAsStream(fullname));

      factory = AgentFactory.createInstance(config);
    }
  }
View Full Code Here

          "Trying default filename '" + filename + "'.");
      }
      String fullname = "/WEB-INF/" + filename;
      logger.info("loading configuration file '" +
          getServletContext().getRealPath(fullname) + "'...");
      Config config = new Config(getServletContext().getResourceAsStream(fullname));

      // TODO: create the agentFactory in a synchronized way
      agentFactory = AgentFactory.createInstance();
      agentFactory.setStateFactory(config);
      agentFactory.addTransportServices(config);
View Full Code Here

      final String fullname = "/WEB-INF/" + filename;
     
      LOG.info("loading configuration file '" + c.getRealPath(fullname)
          + "'...");
     
      final Config config = new Config(c.getResourceAsStream(fullname));
      try {
        AgentHost.getInstance().loadConfig(config);
      } catch (final Exception e) {
        LOG.log(Level.WARNING, "", e);
      }
View Full Code Here

      String fullname = "/WEB-INF/" + filename;

      logger.info("loading configuration file '"
          + c.getRealPath(fullname) + "'...");

      Config config = new Config(c.getResourceAsStream(fullname));
      try {
        AgentFactory.createInstance(config);
      } catch (Exception e) {
        e.printStackTrace();
      }
View Full Code Here

          "Trying default filename '" + filename + "'.");
      }
      String fullname = "/WEB-INF/" + filename;
      logger.info("loading configuration file '" +
          getServletContext().getRealPath(fullname) + "'...");
      Config config = new Config(getServletContext().getResourceAsStream(fullname));

      // TODO: create the agentFactory in a synchronized way
      agentFactory = AgentFactory.createInstance();
      agentFactory.setStateFactory(config);
      agentFactory.addTransportServices(config);
View Full Code Here

          "Trying default filename '" + filename + "'.");
      }
      String fullname = "/WEB-INF/" + filename;
      logger.info("loading configuration file '" +
          getServletContext().getRealPath(fullname) + "'...");
      Config config = new Config(getServletContext().getResourceAsStream(fullname));
     
      agentFactory = AgentFactory.createInstance(config);
    }
  }
View Full Code Here

      String fullname = "/WEB-INF/" + filename;

      LOG.info("loading configuration file '" + c.getRealPath(fullname) + "'...");

      Config config = new Config(c.getResourceAsStream(fullname));
      try {
        AgentHost.getInstance().loadConfig(config);
      } catch (Exception e) {
        LOG.log(Level.WARNING, "", e);
      }
View Full Code Here

  @Override
  public void init() {
    try {
      // load configuration
      InputStream is = getServletContext().getResourceAsStream(CONFIG_FILENAME);
      Config config = new Config(is);

      CLIENT_ID = config.get("google", "client_id");
      if (CLIENT_ID == null) {
        throw new Exception("Parameter 'google.client_id' missing in config");
      }
     
      CLIENT_SECRET = config.get("google", "client_secret");
      if (CLIENT_SECRET == null) {
        throw new Exception("Parameter 'google.client_secret' missing in config");
      }

      // first read the servlet url from the current environment settings,
      // if not available, read it from the global settings.
      String environment = AgentFactory.getEnvironment();
      REDIRECT_URI = config.get("environment", environment, "google_auth_servlet_url");
      if (REDIRECT_URI == null) {
        REDIRECT_URI = config.get("google_auth_servlet_url");
      }
     
      // TODO: cleanup deprecated parameter some day (deprecated since 2013-02-15)
      if (REDIRECT_URI == null) {
        REDIRECT_URI = config.get("environment", environment, "auth_google_servlet_url");
        if (REDIRECT_URI == null) {
          REDIRECT_URI = config.get("auth_google_servlet_url");
        }
        if (REDIRECT_URI != null) {
          logger.warning("Parameter 'auth_google_servlet_url' is deprecated. " +
              "Use 'google_auth_servlet_url' instead.");
        }
View Full Code Here

TOP

Related Classes of com.almende.eve.config.Config

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.