org.opennms.bb.dp.poller.scheduler.utils
Class RangeInfo

java.lang.Object
  |
  +--org.opennms.bb.dp.poller.scheduler.utils.RangeInfo

public class RangeInfo
extends Object

This class is responsible for holding information about a range parsed from the package.xml file.

Version:
$Revision: 1.2 $
Author:
Jason Johns, OpenNMS

Field Summary
private  List m_erange
          The exclude range parameters, from the tags
private  List m_irange
          The include range parameters, from the tags
private  List m_rangeDef
          The default range parameters, from the tags
private  List m_specific
          The specific parameters, from the tags
private  List m_url
          The url parameters, from the tags
 
Constructor Summary
RangeInfo()
          Default constructor, allocates members
 
Method Summary
 void addDefRange(PollerRange aRange)
          This method adds a default range
 void addErange(PollerRange aRange)
          This method adds a exclude range
 void addIrange(PollerRange aRange)
          This method adds a include range
 void addSpecific(PollerRange aRange)
          This method adds a specific range
 void addUrl(PollerRange aRange)
          This method adds a url range
 boolean inExclude(String ipAddr)
          This method returns a boolean indicating if an ip address falls within the exclude ranges.
 boolean inInclude(String ipAddr)
          This method returns a boolean indicating if an ip address falls within the include ranges.
 boolean inSpecific(String ipAddr)
          This method returns a boolean indicating if an ip address matches any ip addresses contained in the specific ranges
private  StringBuffer rangePrint(List list)
          This method takes the elements from the member lists and appends them to a string buffer for string representation.
 String toString()
          This method returns a string representation of the RangeInfo
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait
 

Field Detail

m_rangeDef

private List m_rangeDef
The default range parameters, from the tags

m_irange

private List m_irange
The include range parameters, from the tags

m_erange

private List m_erange
The exclude range parameters, from the tags

m_specific

private List m_specific
The specific parameters, from the tags

m_url

private List m_url
The url parameters, from the tags
Constructor Detail

RangeInfo

public RangeInfo()
Default constructor, allocates members
Method Detail

inSpecific

public boolean inSpecific(String ipAddr)
This method returns a boolean indicating if an ip address matches any ip addresses contained in the specific ranges
Parameters:
String - ipAddr, the address to check
Returns:
boolean, indicating if address matches a specific

inExclude

public boolean inExclude(String ipAddr)
This method returns a boolean indicating if an ip address falls within the exclude ranges.
Parameters:
String - ipAddr, the address to check
Returns:
boolean, indicating if address is excluded

inInclude

public boolean inInclude(String ipAddr)
This method returns a boolean indicating if an ip address falls within the include ranges.
Parameters:
String - ipAddr, the address to check
Returns:
boolean, indicating if address is included

addDefRange

public void addDefRange(PollerRange aRange)
This method adds a default range
Parameters:
PollerRange - aRange, the range to be added

addIrange

public void addIrange(PollerRange aRange)
This method adds a include range
Parameters:
PollerRange - aRange, the range to be added

addErange

public void addErange(PollerRange aRange)
This method adds a exclude range
Parameters:
PollerRange - aRange, the range to be added

addSpecific

public void addSpecific(PollerRange aRange)
This method adds a specific range
Parameters:
PollerRange - aRange, the range to be added

addUrl

public void addUrl(PollerRange aRange)
This method adds a url range
Parameters:
PollerRange - aRange, the range to be added

toString

public String toString()
This method returns a string representation of the RangeInfo
Overrides:
toString in class Object
Returns:
String, the string representation of the RangeInfo

rangePrint

private StringBuffer rangePrint(List list)
This method takes the elements from the member lists and appends them to a string buffer for string representation.
Parameters:
List - list, the list to convert to StringBuffer
Returns:
StringBuffer, the contents of the list as a StringBuffer