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 void
addExcludeRange(ExcludeRange range)
void
addIncludeRange(IncludeRange range)
void
addIncludeUrl(String url)
void
addOutageCalendar(String calendar)
void
addService(Service service)
void
addSpecific(String specific)
boolean
equals(Object obj)
List<ExcludeRange>
getExcludeRanges()
Filter
getFilter()
A rule which addresses belonging to this package must pass.String
getIfAliasComment()
A character or string for terminating ifAlias text.String
getIfAliasDomain()
The name of the domain covered by this collection package.List<IncludeRange>
getIncludeRanges()
List<String>
getIncludeUrls()
String
getName()
The name or identifier for this packageList<String>
getOutageCalendars()
Service
getService(String svcName)
List<Service>
getServices()
List<String>
getSpecifics()
String
getStoreByIfAlias()
Flag for storing collected data by domain/ifAlias.String
getStoreByNodeID()
Flag for storing collected data by nodeid/interface name.String
getStorFlagOverride()
RFlag for controlling how interfaces are selected for data collection by domain/ifAlias.boolean
hasExcludeRange(String addr)
int
hashCode()
boolean
hasIncludeRange(String addr)
boolean
hasSpecific(byte[] addr)
boolean
hasSpecificUrl(String iface, boolean hasSpecific)
boolean
isRemote()
boolean
removeExcludeRange(ExcludeRange range)
boolean
removeIncludeRange(IncludeRange range)
boolean
removeIncludeUrl(String url)
boolean
removeOutageCalendar(String calendar)
boolean
removeService(Service service)
boolean
removeSpecific(String specific)
boolean
serviceInPackageAndEnabled(String svcName)
Returns true if the service is part of the package and the status of the service is set to "on".void
setExcludeRanges(List<ExcludeRange> ranges)
void
setFilter(Filter filter)
void
setIfAliasComment(String ifAliasComment)
void
setIfAliasDomain(String ifAliasDomain)
void
setIncludeRanges(List<IncludeRange> ranges)
void
setIncludeUrlCollection(List<String> urls)
void
setName(String name)
void
setOutageCalendars(List<String> calendars)
void
setRemote(boolean remote)
void
setServices(List<Service> services)
void
setSpecifics(List<String> specifics)
void
setStoreByIfAlias(String storeByIfAlias)
void
setStoreByNodeID(String storeByNodeID)
void
setStorFlagOverride(String storFlagOverride)
String
toString()
-
-
-
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)
-
-