public class CollectdConfigFactory extends Object implements CollectdConfigFactory
| Modifier and Type | Field and Description | 
|---|---|
static String | 
SELECT_METHOD_MIN  | 
| Constructor and Description | 
|---|
CollectdConfigFactory()  | 
CollectdConfigFactory(InputStream stream)
For testing purposes only. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
boolean | 
domainExists(String name)
Returns true if collection domain exists 
 | 
CollectdConfiguration | 
getCollectdConfig()
getCollectdConfig 
 | 
Package | 
getPackage(String name)
getPackage 
 | 
boolean | 
interfaceInFilter(String iface,
                 Package pkg)  | 
boolean | 
interfaceInPackage(OnmsIpInterface iface,
                  Package pkg)
This method is used to determine if the named interface is included in
 the passed package definition. 
 | 
boolean | 
interfaceInPackage(String iface,
                  Package pkg)
Deprecated. 
 
This function should take normal model objects instead of bare IP 
 addresses. Move this implementation into  
interfaceInPackage(OnmsIpInterface, Package). | 
boolean | 
isServiceCollectionEnabled(OnmsIpInterface iface,
                          String svcName)
Returns true if the specified interface is included by at least one
 package which has the specified service and that service is enabled (set
 to "on"). 
 | 
boolean | 
isServiceCollectionEnabled(OnmsMonitoredService service)
Returns true if the specified service's interface is included by at least one
 package which has the specified service and that service is enabled (set
 to "on"). 
 | 
boolean | 
isServiceCollectionEnabled(String ipAddr,
                          String svcName)
Deprecated. 
 
This function should take normal model objects instead of bare IP addresses
 and service names. Use  
isServiceCollectionEnabled(OnmsIpInterface, String)
 instead. | 
boolean | 
packageExists(String name)
Returns true if collection package exists 
 | 
void | 
reload()
Reload the config from the default config file 
 | 
void | 
saveCurrent()
Saves the current in-memory configuration to disk and reloads 
 | 
public static final String SELECT_METHOD_MIN
public CollectdConfigFactory()
                      throws IOException
IOExceptionpublic CollectdConfigFactory(InputStream stream) throws IOException
stream - IOExceptionpublic void reload()
            throws IOException
reload in interface CollectdConfigFactoryIOException - Thrown if the specified config file cannot be read/loadedIOException - if any.public void saveCurrent()
                 throws IOException
saveCurrent in interface CollectdConfigFactoryIOException - if any.public CollectdConfiguration getCollectdConfig()
getCollectdConfig
getCollectdConfig in interface CollectdConfigFactoryCollectdConfiguration object.public boolean packageExists(String name)
packageExists in interface CollectdConfigFactoryname - The package name to checkpublic Package getPackage(String name)
getPackage
getPackage in interface CollectdConfigFactoryname - a String object.Package object.public boolean domainExists(String name)
domainExists in interface CollectdConfigFactoryname - The domain name to checkpublic boolean isServiceCollectionEnabled(OnmsMonitoredService service)
isServiceCollectionEnabled in interface CollectdConfigFactoryservice - OnmsMonitoredService to checkpublic boolean isServiceCollectionEnabled(OnmsIpInterface iface, String svcName)
isServiceCollectionEnabled in interface CollectdConfigFactoryiface - OnmsIpInterface to lookupsvcName - The service name to lookuppublic boolean isServiceCollectionEnabled(String ipAddr, String svcName)
isServiceCollectionEnabled(OnmsIpInterface, String)
 instead.isServiceCollectionEnabled in interface CollectdConfigFactoryipAddr - IP address of the interface to lookupsvcName - The service name to lookuppublic boolean interfaceInFilter(String iface, Package pkg)
interfaceInFilter in interface CollectdConfigFactorypublic boolean interfaceInPackage(String iface, Package pkg)
interfaceInPackage(OnmsIpInterface, Package).interfaceInPackage in interface CollectdConfigFactoryiface - The interface to test against the package.public boolean interfaceInPackage(OnmsIpInterface iface, Package pkg)
interfaceInPackage in interface CollectdConfigFactoryiface - The interface to test against the package.Copyright © 2020. All rights reserved.