OpenNMS API 1.2.3

org.opennms.netmgt.discovery
Class IPPollRange

java.lang.Object
  extended byorg.opennms.netmgt.discovery.IPPollRange

final class IPPollRange
extends java.lang.Object

This class is designed to encapsualte the information about an address range plus the retry & timeout information. The class is designed so that it can return either an enumerationor an iteratorto traverse the range of addresses.

Author:
Sowmya , Brian Weaver , OpenNMS

Nested Class Summary
(package private)  class IPPollRange.IPPollRangeGenerator
           The purpose of the IPPollRangeGenerator class is to provide an Enumeration or Iterator object that can be returned by the encapsulating class.
 
Field Summary
private  IPAddressRange m_range
          The range to cycle over.
private  int m_retries
          The number of retries for each generate object.
private  long m_timeout
          The timeout in milliseconds (1/1000th)
 
Constructor Summary
(package private) IPPollRange(java.net.InetAddress start, java.net.InetAddress end, long timeout, int retries)
           Creates an IPPollRange object that can be used to generate IPPollAddress objects.
(package private) IPPollRange(IPAddressRange range, long timeout, int retries)
           Creates an IPPollRange object that can be used to generate IPPollAddress objects.
(package private) IPPollRange(java.lang.String fromIP, java.lang.String toIP, long timeout, int retries)
           Creates an IPPollRange object that can be used to generate IPPollAddress objects.
 
Method Summary
(package private)  java.util.Enumeration elements()
           Returns an Enumeration that can be used to cycle over the range of pollable addresses.
(package private)  IPAddressRange getAddressRange()
           Returns the configured address ranges that are encapsulated by this object.
(package private)  int getRetries()
           Returns the retry count for the object.
(package private)  long getTimeout()
           Returns the timeout set for the object.
(package private)  java.util.Iterator iterator()
           Returns an Iterator object that can be used to cycle over the range of pollable address information.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_range

private IPAddressRange m_range
The range to cycle over.


m_timeout

private long m_timeout
The timeout in milliseconds (1/1000th)


m_retries

private int m_retries
The number of retries for each generate object.

Constructor Detail

IPPollRange

IPPollRange(java.lang.String fromIP,
            java.lang.String toIP,
            long timeout,
            int retries)
      throws java.net.UnknownHostException

Creates an IPPollRange object that can be used to generate IPPollAddress objects. The addresses are encapsulated by the range object and the values of timeout and retry are set in each generated IPPollAddress object.

Parameters:
fromIP - The start of the address range to cycle over.
toIP - The end of the address range to cycle over.
timeout - The timeout for each generated IPPollAddress.
retries - The number of retries for generated addresses.
See Also:
IPPollAddress, IPAddressRange

IPPollRange

IPPollRange(java.net.InetAddress start,
            java.net.InetAddress end,
            long timeout,
            int retries)

Creates an IPPollRange object that can be used to generate IPPollAddress objects. The addresses are encapsulated by the range [start..end] and the values of timeout and retry are set in each generated IPPollAddress object.

Parameters:
start - The start of the address range to cycle over.
end - The end of the address range to cycle over.
timeout - The timeout for each generated IPPollAddress.
retries - The number of retries for generated addresses.
See Also:
IPPollAddress, IPAddressRange

IPPollRange

IPPollRange(IPAddressRange range,
            long timeout,
            int retries)

Creates an IPPollRange object that can be used to generate IPPollAddress objects. The addresses are encapsulated by the range object and the values of timeout and retry are set in each generated IPPollAddress object.

Parameters:
range - The address range to cycle over.
timeout - The timeout for each generated IPPollAddress.
retries - The number of retries for generated addresses.
See Also:
IPPollAddress
Method Detail

getTimeout

long getTimeout()

Returns the timeout set for the object. The timeout should be in 1/1000th of a second increments.


getRetries

int getRetries()

Returns the retry count for the object.


getAddressRange

IPAddressRange getAddressRange()

Returns the configured address ranges that are encapsulated by this object.


elements

java.util.Enumeration elements()

Returns an Enumeration that can be used to cycle over the range of pollable addresses.


iterator

java.util.Iterator iterator()

Returns an Iterator object that can be used to cycle over the range of pollable address information.


OpenNMS API 1.2.3

Generated by eevans on May 29 2005 2015.