示例#1
0
  /**
   * Reads listener config from the config repository and caches its content in to the hash table.
   */
  public static void load() {

    log.info("Config : loading Listener info"); // $NON-NLS-1$

    Collection children = Collections.EMPTY_LIST;

    try {

      Content startPage =
          ContentRepository.getHierarchyManager(ContentRepository.CONFIG).getContent(CONFIG_PAGE);
      Content configNode = startPage.getContent("IPConfig");
      children = configNode.getChildren(ItemType.CONTENTNODE); // $NON-NLS-1$
    } catch (RepositoryException re) {
      log.error("Config : Failed to load Listener info"); // $NON-NLS-1$
      log.error(re.getMessage(), re);
    }

    Listener.cachedContent.clear();
    Listener.cacheContent(children);
    log.info("Config : Listener info loaded"); // $NON-NLS-1$
  }
示例#2
0
 public static void reload() {
   log.info("Config : re-loading Listener info"); // $NON-NLS-1$
   Listener.load();
 }