当前位置: 首页>>代码示例>>Java>>正文


Java PollerConfigFactory.init方法代码示例

本文整理汇总了Java中org.opennms.netmgt.config.PollerConfigFactory.init方法的典型用法代码示例。如果您正苦于以下问题:Java PollerConfigFactory.init方法的具体用法?Java PollerConfigFactory.init怎么用?Java PollerConfigFactory.init使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.opennms.netmgt.config.PollerConfigFactory的用法示例。


在下文中一共展示了PollerConfigFactory.init方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: initPollerConfigFactory

import org.opennms.netmgt.config.PollerConfigFactory; //导入方法依赖的package包/类
private void initPollerConfigFactory() throws ServletException {
    try {
        PollerConfigFactory.init();
    } catch (Throwable e) {
        throw new ServletException(e);
    }
    m_pollerFactory = PollerConfigFactory.getInstance();
    m_pollerConfig = m_pollerFactory.getConfiguration();
    if (m_pollerConfig == null) {
        throw new ServletException("Poller Configuration file is empty");
    }
}
 
开发者ID:qoswork,项目名称:opennmszh,代码行数:13,代码来源:PollerConfigServlet.java

示例2: init

import org.opennms.netmgt.config.PollerConfigFactory; //导入方法依赖的package包/类
/**
 * <p>init</p>
 *
 * @throws javax.servlet.ServletException if any.
 */
public void init() throws ServletException {
    ServletConfig config = this.getServletConfig();
    try {
        props.load(new FileInputStream(ConfigFileConstants.getFile(ConfigFileConstants.POLLER_CONF_FILE_NAME)));
        PollerConfigFactory.init();
        pollerFactory = PollerConfigFactory.getInstance();
        pollerConfig = pollerFactory.getConfiguration();

        if (pollerConfig == null) {
            // response.sendRedirect( "error.jsp?error=2");
            errorflag = true;
            throw new ServletException("Poller Configuration file is empty");
        }
        CapsdConfigFactory.init();
        capsdFactory = CapsdConfigFactory.getInstance();
        capsdConfig = capsdFactory.getConfiguration();

        if (capsdConfig == null) {
            // response.sendRedirect( "error.jsp?error=3");
            errorflag = true;
            throw new ServletException("Capsd Configuration file is empty");
        }
    } catch (Throwable e) {
        throw new ServletException(e.getMessage());
    }
    initPollerServices();
    initCapsdProtocols();
    this.redirectSuccess = config.getInitParameter("redirect.success");
    if (this.redirectSuccess == null) {
        throw new ServletException("Missing required init parameter: redirect.success");
    }
}
 
开发者ID:qoswork,项目名称:opennmszh,代码行数:38,代码来源:AddPollerConfigServlet.java

示例3: reloadFiles

import org.opennms.netmgt.config.PollerConfigFactory; //导入方法依赖的package包/类
/**
 * <p>reloadFiles</p>
 *
 * @throws javax.servlet.ServletException if any.
 */
public void reloadFiles() throws ServletException {
    ServletConfig config = this.getServletConfig();
    try {
        props.load(new FileInputStream(ConfigFileConstants.getFile(ConfigFileConstants.POLLER_CONF_FILE_NAME)));
        PollerConfigFactory.init();
        pollerFactory = PollerConfigFactory.getInstance();
        pollerConfig = pollerFactory.getConfiguration();

        if (pollerConfig == null) {
            // response.sendRedirect( "error.jsp?error=2");
            errorflag = true;
            throw new ServletException("Poller Configuration file is empty");
        }
        CapsdConfigFactory.init();
        capsdFactory = CapsdConfigFactory.getInstance();
        capsdConfig = capsdFactory.getConfiguration();

        if (capsdConfig == null) {
            errorflag = true;
            // response.sendRedirect( "error.jsp?error=3");
            throw new ServletException("Capsd Configuration file is empty");
        }
    } catch (Throwable e) {
        throw new ServletException(e.getMessage());
    }
    initPollerServices();
    initCapsdProtocols();
    this.redirectSuccess = config.getInitParameter("redirect.success");
    if (this.redirectSuccess == null) {
        throw new ServletException("Missing required init parameter: redirect.success");
    }
}
 
开发者ID:qoswork,项目名称:opennmszh,代码行数:38,代码来源:AddPollerConfigServlet.java

示例4: init

import org.opennms.netmgt.config.PollerConfigFactory; //导入方法依赖的package包/类
/**
 * <p>init</p>
 *
 * @throws javax.servlet.ServletException if any.
 */
public void init() throws ServletException {
    ServletConfig config = this.getServletConfig();
    try {
        props.load(new FileInputStream(ConfigFileConstants.getFile(ConfigFileConstants.POLLER_CONF_FILE_NAME)));
        PollerConfigFactory.init();
        pollerFactory = PollerConfigFactory.getInstance();
        pollerConfig = pollerFactory.getConfiguration();

        if (pollerConfig == null) {
            throw new ServletException("Poller Configuration file is empty");
        }
        CapsdConfigFactory.init();
        capsdFactory = CapsdConfigFactory.getInstance();
        capsdConfig = capsdFactory.getConfiguration();

        if (capsdConfig == null) {
            throw new ServletException("Poller Configuration file is empty");
        }
    } catch (Throwable e) {
        throw new ServletException(e.getMessage());
    }
    initPollerServices();
    initCapsdProtocols();
    this.redirectSuccess = config.getInitParameter("redirect.success");
    if (this.redirectSuccess == null) {
        throw new ServletException("Missing required init parameter: redirect.success");
    }
}
 
开发者ID:qoswork,项目名称:opennmszh,代码行数:34,代码来源:PollerConfigServlet.java

示例5: reloadFiles

import org.opennms.netmgt.config.PollerConfigFactory; //导入方法依赖的package包/类
/**
 * <p>reloadFiles</p>
 *
 * @throws javax.servlet.ServletException if any.
 */
public void reloadFiles() throws ServletException {
    ServletConfig config = this.getServletConfig();
    try {
        props.load(new FileInputStream(ConfigFileConstants.getFile(ConfigFileConstants.POLLER_CONF_FILE_NAME)));
        PollerConfigFactory.init();
        pollerFactory = PollerConfigFactory.getInstance();
        pollerConfig = pollerFactory.getConfiguration();

        if (pollerConfig == null) {
            throw new ServletException("Poller Configuration file is empty");
        }
        CapsdConfigFactory.init();
        capsdFactory = CapsdConfigFactory.getInstance();
        capsdConfig = capsdFactory.getConfiguration();

        if (capsdConfig == null) {
            throw new ServletException("Poller Configuration file is empty");
        }
    } catch (Throwable e) {
        throw new ServletException(e.getMessage());
    }
    initPollerServices();
    initCapsdProtocols();
    this.redirectSuccess = config.getInitParameter("redirect.success");
    if (this.redirectSuccess == null) {
        throw new ServletException("Missing required init parameter: redirect.success");
    }
}
 
开发者ID:qoswork,项目名称:opennmszh,代码行数:34,代码来源:PollerConfigServlet.java

示例6: readPollerConfiguration

import org.opennms.netmgt.config.PollerConfigFactory; //导入方法依赖的package包/类
private PollerConfiguration readPollerConfiguration() throws IOException, MarshalException, ValidationException {
    PollerConfigFactory.init();
    PollerConfigFactory pollerConfigFactory = new PollerConfigFactory(0, new FileInputStream(new File(CONFIG_FOLDER.concat(File.separator + CONFIG_FILE))), "LocalServer?", false);
    return pollerConfigFactory.getConfiguration();
}
 
开发者ID:indigo423,项目名称:opennms-config-audit,代码行数:6,代码来源:PollerChecker.java


注:本文中的org.opennms.netmgt.config.PollerConfigFactory.init方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。