Class Package
- java.lang.Object
-
- org.opennms.netmgt.config.collectd.Package
-
- All Implemented Interfaces:
Serializable
public class Package extends Object implements Serializable
Package encapsulating addresses eligible to have SNMP data collected from them.- See Also:
- Serialized Form
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddExcludeRange(ExcludeRange range)voidaddIncludeRange(IncludeRange range)voidaddIncludeUrl(String url)voidaddOutageCalendar(String calendar)voidaddService(Service service)voidaddSpecific(String specific)booleanequals(Object obj)List<ExcludeRange>getExcludeRanges()FiltergetFilter()A rule which addresses belonging to this package must pass.StringgetIfAliasComment()A character or string for terminating ifAlias text.StringgetIfAliasDomain()The name of the domain covered by this collection package.List<IncludeRange>getIncludeRanges()List<String>getIncludeUrls()StringgetName()The name or identifier for this packageList<String>getOutageCalendars()ServicegetService(String svcName)List<Service>getServices()List<String>getSpecifics()StringgetStoreByIfAlias()Flag for storing collected data by domain/ifAlias.StringgetStoreByNodeID()Flag for storing collected data by nodeid/interface name.StringgetStorFlagOverride()RFlag for controlling how interfaces are selected for data collection by domain/ifAlias.booleanhasExcludeRange(String addr)inthashCode()booleanhasIncludeRange(String addr)booleanhasSpecific(byte[] addr)booleanhasSpecificUrl(String iface, boolean hasSpecific)booleanisRemote()booleanremoveExcludeRange(ExcludeRange range)booleanremoveIncludeRange(IncludeRange range)booleanremoveIncludeUrl(String url)booleanremoveOutageCalendar(String calendar)booleanremoveService(Service service)booleanremoveSpecific(String specific)booleanserviceInPackageAndEnabled(String svcName)Returns true if the service is part of the package and the status of the service is set to "on".voidsetExcludeRanges(List<ExcludeRange> ranges)voidsetFilter(Filter filter)voidsetIfAliasComment(String ifAliasComment)voidsetIfAliasDomain(String ifAliasDomain)voidsetIncludeRanges(List<IncludeRange> ranges)voidsetIncludeUrlCollection(List<String> urls)voidsetName(String name)voidsetOutageCalendars(List<String> calendars)voidsetRemote(boolean remote)voidsetServices(List<Service> services)voidsetSpecifics(List<String> specifics)voidsetStoreByIfAlias(String storeByIfAlias)voidsetStoreByNodeID(String storeByNodeID)voidsetStorFlagOverride(String storFlagOverride)StringtoString()
-
-
-
Constructor Detail
-
Package
public Package()
-
Package
public Package(Package pkg)
Copy constructor.- Parameters:
pkg-
-
-
Method Detail
-
getName
public String getName()
The name or identifier for this package
-
setName
public void setName(String name)
-
getFilter
public Filter getFilter()
A rule which addresses belonging to this package must pass. This package is applied only to addresses that pass this filter.
-
setFilter
public void setFilter(Filter filter)
-
addSpecific
public void addSpecific(String specific) throws IndexOutOfBoundsException
- Throws:
IndexOutOfBoundsException
-
removeSpecific
public boolean removeSpecific(String specific)
-
hasSpecific
public boolean hasSpecific(byte[] addr)
-
getIncludeRanges
public List<IncludeRange> getIncludeRanges()
-
setIncludeRanges
public void setIncludeRanges(List<IncludeRange> ranges)
-
addIncludeRange
public void addIncludeRange(IncludeRange range) throws IndexOutOfBoundsException
- Throws:
IndexOutOfBoundsException
-
removeIncludeRange
public boolean removeIncludeRange(IncludeRange range)
-
hasIncludeRange
public boolean hasIncludeRange(String addr)
-
getExcludeRanges
public List<ExcludeRange> getExcludeRanges()
-
setExcludeRanges
public void setExcludeRanges(List<ExcludeRange> ranges)
-
addExcludeRange
public void addExcludeRange(ExcludeRange range) throws IndexOutOfBoundsException
- Throws:
IndexOutOfBoundsException
-
removeExcludeRange
public boolean removeExcludeRange(ExcludeRange range)
-
hasExcludeRange
public boolean hasExcludeRange(String addr)
-
addIncludeUrl
public void addIncludeUrl(String url) throws IndexOutOfBoundsException
- Throws:
IndexOutOfBoundsException
-
removeIncludeUrl
public boolean removeIncludeUrl(String url)
-
hasSpecificUrl
public boolean hasSpecificUrl(String iface, boolean hasSpecific)
-
getStoreByIfAlias
public String getStoreByIfAlias()
Flag for storing collected data by domain/ifAlias. Defaults to false. Allowable values are true, false.
-
setStoreByIfAlias
public void setStoreByIfAlias(String storeByIfAlias)
-
getStoreByNodeID
public String getStoreByNodeID()
Flag for storing collected data by nodeid/interface name. Defaults to normal. Allowable values are true, false, normal.
-
setStoreByNodeID
public void setStoreByNodeID(String storeByNodeID)
-
getStorFlagOverride
public String getStorFlagOverride()
RFlag for controlling how interfaces are selected for data collection by domain/ifAlias. If true, storage will occur for any interface on the node found to have an valid ifAlias. Otherwise data will be stored only if the interface is configured for data collection. Defaults to false.
-
setStorFlagOverride
public void setStorFlagOverride(String storFlagOverride)
-
getIfAliasDomain
public String getIfAliasDomain()
The name of the domain covered by this collection package. Defaults to package name.
-
setIfAliasDomain
public void setIfAliasDomain(String ifAliasDomain)
-
getIfAliasComment
public String getIfAliasComment()
A character or string for terminating ifAlias text. In effect, any text beginning with this character or string becomes a comment and is not considered part of the ifAlias when naming storage files and displaying data. Defaults to null.
-
setIfAliasComment
public void setIfAliasComment(String ifAliasComment)
-
addService
public void addService(Service service) throws IndexOutOfBoundsException
- Throws:
IndexOutOfBoundsException
-
removeService
public boolean removeService(Service service)
-
serviceInPackageAndEnabled
public boolean serviceInPackageAndEnabled(String svcName)
Returns true if the service is part of the package and the status of the service is set to "on". Returns false if the service is not in the package or it is but the status of the service is set to "off".- Parameters:
svcName- The service name to lookup.- Returns:
- a boolean.
-
addOutageCalendar
public void addOutageCalendar(String calendar) throws IndexOutOfBoundsException
- Throws:
IndexOutOfBoundsException
-
removeOutageCalendar
public boolean removeOutageCalendar(String calendar)
-
isRemote
public boolean isRemote()
-
setRemote
public void setRemote(boolean remote)
-
-