當前位置: 首頁>>代碼示例>>Java>>正文


Java PollerConfiguration類代碼示例

本文整理匯總了Java中org.opennms.netmgt.config.poller.PollerConfiguration的典型用法代碼示例。如果您正苦於以下問題:Java PollerConfiguration類的具體用法?Java PollerConfiguration怎麽用?Java PollerConfiguration使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


PollerConfiguration類屬於org.opennms.netmgt.config.poller包,在下文中一共展示了PollerConfiguration類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: updateServiceCompounds

import org.opennms.netmgt.config.poller.PollerConfiguration; //導入依賴的package包/類
Map<String, ServiceCompound> updateServiceCompounds(Map<String, ServiceCompound> serviceCompounds) throws IOException, MarshalException, ValidationException {
    PollerConfiguration pollerConfiguration = readPollerConfiguration();

    for (Monitor monitor : pollerConfiguration.getMonitorCollection()) {
        if (!serviceCompounds.containsKey(monitor.getService())) {
            serviceCompounds.put(monitor.getService(), new ServiceCompound(monitor.getService()));
        }
        serviceCompounds.get(monitor.getService()).setMonitor(monitor);
    }
    for (org.opennms.netmgt.config.poller.Package pollerPackage : pollerConfiguration.getPackageCollection()) {
        for (Service service : pollerPackage.getServiceCollection()) {
            if (!serviceCompounds.containsKey(service.getName())) {
                serviceCompounds.put(service.getName(), new ServiceCompound(service.getName()));
            }
            serviceCompounds.get(service.getName()).setPollerService(service);
        }
    }
    return serviceCompounds;
}
 
開發者ID:indigo423,項目名稱:opennms-config-audit,代碼行數:20,代碼來源:PollerChecker.java

示例2: update

import org.opennms.netmgt.config.poller.PollerConfiguration; //導入依賴的package包/類
/**
 * <p>update</p>
 *
 * @throws java.io.IOException if any.
 * @throws org.exolab.castor.xml.MarshalException if any.
 * @throws org.exolab.castor.xml.ValidationException if any.
 */
public void update() throws IOException, MarshalException, ValidationException {
    getWriteLock().lock();
    try {
        final File cfgFile = ConfigFileConstants.getFile(ConfigFileConstants.POLLER_CONFIG_FILE_NAME);
        if (cfgFile.lastModified() > m_currentVersion) {
            m_currentVersion = cfgFile.lastModified();
            LogUtils.debugf(this, "init: config file path: %s", cfgFile.getPath());
            InputStream stream = null;
            try {
                stream = new FileInputStream(cfgFile);
                m_config = CastorUtils.unmarshal(PollerConfiguration.class, stream);
            } finally {
                IOUtils.closeQuietly(stream);
            }
            init();
            LogUtils.debugf(this, "init: finished loading config file: %s", cfgFile.getPath());
        }
    } finally {
        getWriteLock().unlock();
    }
}
 
開發者ID:qoswork,項目名稱:opennmszh,代碼行數:29,代碼來源:PollerConfigFactory.java

示例3: getConfiguration

import org.opennms.netmgt.config.poller.PollerConfiguration; //導入依賴的package包/類
/**
 * Return the poller configuration object.
 *
 * @return a {@link org.opennms.netmgt.config.poller.PollerConfiguration} object.
 */
@Override
public PollerConfiguration getConfiguration() {
    getReadLock().lock();
    try {
        return m_config;
    } finally {
        getReadLock().unlock();
    }
}
 
開發者ID:qoswork,項目名稱:opennmszh,代碼行數:15,代碼來源:PollerConfigManager.java

示例4: getConfiguration

import org.opennms.netmgt.config.poller.PollerConfiguration; //導入依賴的package包/類
/**
 * Return the poller configuration object.
 *
 * @return a {@link org.opennms.netmgt.config.poller.PollerConfiguration} object.
 */
public PollerConfiguration getConfiguration() {
    getReadLock().lock();
    try {
        return m_config;
    } finally {
        getReadLock().unlock();
    }
}
 
開發者ID:vishwaabhinav,項目名稱:OpenNMS,代碼行數:14,代碼來源:PollerConfigManager.java

示例5: readPollerConfiguration

import org.opennms.netmgt.config.poller.PollerConfiguration; //導入依賴的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

示例6: testPollerConfiguration

import org.opennms.netmgt.config.poller.PollerConfiguration; //導入依賴的package包/類
@Test
public void testPollerConfiguration() throws Exception {
    unmarshal("poller-configuration.xml", PollerConfiguration.class);
}
 
開發者ID:qoswork,項目名稱:opennmszh,代碼行數:5,代碼來源:WillItUnmarshalTest.java

示例7: testExamplePollerConfiguration

import org.opennms.netmgt.config.poller.PollerConfiguration; //導入依賴的package包/類
@Test
public void testExamplePollerConfiguration() throws Exception {
    unmarshalExample("poller-configuration.xml", PollerConfiguration.class);
}
 
開發者ID:qoswork,項目名稱:opennmszh,代碼行數:5,代碼來源:WillItUnmarshalTest.java

示例8: update

import org.opennms.netmgt.config.poller.PollerConfiguration; //導入依賴的package包/類
@Override
public void update() throws IOException, MarshalException, ValidationException {
    m_config = CastorUtils.unmarshal(PollerConfiguration.class, new ByteArrayInputStream(m_xml.getBytes("UTF-8")));
    setUpInternalData();
}
 
開發者ID:qoswork,項目名稱:opennmszh,代碼行數:6,代碼來源:PollerConfigFactoryTest.java

示例9: getConfiguration

import org.opennms.netmgt.config.poller.PollerConfiguration; //導入依賴的package包/類
public PollerConfiguration getConfiguration() {
    // FIXME: need to actually implement this
    return null;
}
 
開發者ID:qoswork,項目名稱:opennmszh,代碼行數:5,代碼來源:MockPollerConfig.java

示例10: update

import org.opennms.netmgt.config.poller.PollerConfiguration; //導入依賴的package包/類
@SuppressWarnings("deprecation")
public void update() throws IOException, MarshalException, ValidationException {
    m_config = CastorUtils.unmarshal(PollerConfiguration.class, new StringReader(m_xml));
    setUpInternalData();
}
 
開發者ID:qoswork,項目名稱:opennmszh,代碼行數:6,代碼來源:OpenNMSProvisionerTest.java

示例11: getJavaClass

import org.opennms.netmgt.config.poller.PollerConfiguration; //導入依賴的package包/類
/**
 * Method getJavaClass.
 * 
 * @return the Java class represented by this descriptor.
 */
@Override()
public java.lang.Class<?> getJavaClass(
) {
    return org.opennms.netmgt.config.poller.PollerConfiguration.class;
}
 
開發者ID:vishwaabhinav,項目名稱:OpenNMS,代碼行數:11,代碼來源:PollerConfigurationDescriptor.java

示例12: update

import org.opennms.netmgt.config.poller.PollerConfiguration; //導入依賴的package包/類
public void update() throws IOException, MarshalException, ValidationException {
    m_config = CastorUtils.unmarshal(PollerConfiguration.class, new ByteArrayInputStream(m_xml.getBytes("UTF-8")));
    setUpInternalData();
}
 
開發者ID:vishwaabhinav,項目名稱:OpenNMS,代碼行數:5,代碼來源:PollerConfigFactoryTest.java

示例13: PollerConfigManager

import org.opennms.netmgt.config.poller.PollerConfiguration; //導入依賴的package包/類
/**
 * <p>Constructor for PollerConfigManager.</p>
 *
 * @param stream a {@link java.io.InputStream} object.
 * @param localServer a {@link java.lang.String} object.
 * @param verifyServer a boolean.
 * @throws org.exolab.castor.xml.MarshalException if any.
 * @throws org.exolab.castor.xml.ValidationException if any.
 */
public PollerConfigManager(final InputStream stream, final String localServer, final boolean verifyServer) throws MarshalException, ValidationException {
    m_localServer = localServer;
    m_verifyServer = verifyServer;
    m_config = CastorUtils.unmarshal(PollerConfiguration.class, stream);
    setUpInternalData();
}
 
開發者ID:qoswork,項目名稱:opennmszh,代碼行數:16,代碼來源:PollerConfigManager.java

示例14: getConfiguration

import org.opennms.netmgt.config.poller.PollerConfiguration; //導入依賴的package包/類
/**
 * <p>getConfiguration</p>
 *
 * @return a {@link org.opennms.netmgt.config.poller.PollerConfiguration} object.
 */
PollerConfiguration getConfiguration();
 
開發者ID:qoswork,項目名稱:opennmszh,代碼行數:7,代碼來源:PollerConfig.java

示例15: getConfiguration

import org.opennms.netmgt.config.poller.PollerConfiguration; //導入依賴的package包/類
/**
 * <p>getConfiguration</p>
 *
 * @return a {@link org.opennms.netmgt.config.poller.PollerConfiguration} object.
 */
public abstract PollerConfiguration getConfiguration();
 
開發者ID:vishwaabhinav,項目名稱:OpenNMS,代碼行數:7,代碼來源:PollerConfig.java


注:本文中的org.opennms.netmgt.config.poller.PollerConfiguration類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。