@Override
 public void contextInitialized(ServletContextEvent sce) {
   configurationManager.subscribeTo(
       "container.cfg.xml", configListener, ContainerConfiguration.class);
   configurationManager.subscribeTo(
       "system-model.cfg.xml", systemModelListener, SystemModel.class);
   register();
 }
Exemplo n.º 2
0
 @Override
 public void contextInitialized(ServletContextEvent servletContextEvent) {
   URL xsdURL = getClass().getResource("/META-INF/schema/container/container-configuration.xsd");
   configurationManager.subscribeTo(
       "container.cfg.xml", xsdURL, configurationListener, ContainerConfiguration.class);
   register();
 }
  private void addListener(String wadl) {
    if (wadl == null) {
      return;
    }

    LOG.info("Watching WADL: " + wadl);
    manager.subscribeTo(wadl, wadlListener, new GenericResourceConfigurationParser());
  }
Exemplo n.º 4
0
  @Override
  public void contextInitialized(ServletContextEvent sce) {

    URL xsdURL = getClass().getResource("/META-INF/schema/metrics/metrics.xsd");
    configurationService.subscribeTo(
        "metrics.cfg.xml", xsdURL, metricsCfgListener, MetricsConfiguration.class);

    register();
  }
Exemplo n.º 5
0
  @Override
  public void init(FilterConfig filterConfig) throws ServletException {
    final ServletContext servletContext = filterConfig.getServletContext();
    final ServicePorts ports = ServletContextHelper.getInstance(servletContext).getServerPorts();

    config = new FilterConfigHelper(filterConfig).getFilterConfig(DEFAULT_CONFIG);
    LOG.info("Initializing filter using config " + config);
    handlerFactory = new VersioningHandlerFactory(ports);
    configurationManager =
        ServletContextHelper.getInstance(filterConfig.getServletContext())
            .getPowerApiContext()
            .configurationService();

    configurationManager.subscribeTo("system-model.cfg.xml", handlerFactory, SystemModel.class);
    URL xsdURL = getClass().getResource("/META-INF/schema/config/versioning-configuration.xsd");

    configurationManager.subscribeTo(
        config, xsdURL, handlerFactory, ServiceVersionMappingList.class);
  }
 @Override
 public void contextInitialized(ServletContextEvent sce) {
   this.configDir =
       sce.getServletContext()
           .getInitParameter(InitParameter.POWER_API_CONFIG_DIR.getParameterName());
   this.isInsecure =
       Boolean.parseBoolean(
           sce.getServletContext().getInitParameter(InitParameter.INSECURE.getParameterName()));
   controllerService.setConfigDirectory(configDir);
   URL xsdURL = getClass().getResource("/META-INF/schema/system-model/system-model.xsd");
   URL containerXsdURL =
       getClass().getResource("/META-INF/schema/container/container-configuration.xsd");
   configurationManager.subscribeTo(
       "container.cfg.xml",
       containerXsdURL,
       containerConfigurationListener,
       ContainerConfiguration.class);
   configurationManager.subscribeTo(
       "system-model.cfg.xml", xsdURL, systemModelConfigurationListener, SystemModel.class);
   register();
 }