|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.opennms.bb.dp.discovery.components.IPPollRange
The IPPollRange class is used to encapsulate a range of addresses that are assocaited with a timeout and retry count. The core class encapsulated is the IPAddressRange class.
The IPPollRange class can generate either an Iterator or an Enumeration to cycle over the addresses. The generated objects encapsulate generators returned by the IPAddressRange object and simply attach the correct timeout and retry for the new objects.
Inner Class Summary | |
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 long |
m_retries
The number of retries for each generate object. |
private long |
m_timeout
The timeout in milliseconds (1/1000th) |
Constructor Summary | |
IPPollRange(InetAddress start,
InetAddress end,
long timeout,
long retries)
Creates an IPPollRange object that can be used to generate IPPollAddress objects. |
|
IPPollRange(IPAddressRange range,
long timeout,
long retries)
Creates an IPPollRange object that can be used to generate IPPollAddress objects. |
|
IPPollRange(String fromIP,
String toIP,
long timeout,
long retries)
Creates an IPPollRange object that can be used to generate IPPollAddress objects. |
Method Summary | |
Enumeration |
elements()
Returns an Enumeration that can be used to cycle over the range of pollable addresses. |
IPAddressRange |
getAddressRange()
Returns the configured address ranges that are encapsulated by this object. |
long |
getRetries()
Returns the retry count for the object. |
long |
getTimeout()
Returns the timeout set for the object. |
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 |
|
Field Detail |
private IPAddressRange m_range
private long m_timeout
private long m_retries
Constructor Detail |
public IPPollRange(String fromIP, String toIP, long timeout, long retries) throws 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.
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.IPPollAddress
,
IPAddressRange
public IPPollRange(InetAddress start, InetAddress end, long timeout, long 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.
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.IPPollAddress
,
IPAddressRange
public IPPollRange(IPAddressRange range, long timeout, long 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.
range
- The address range to cycle over.timeout
- The timeout for each generated IPPollAddress.retries
- The number of retries for generated addresses.IPPollAddress
Method Detail |
public long getTimeout()
Returns the timeout set for the object. The timeout should be in 1/1000th of a second increments.
public long getRetries()
Returns the retry count for the object.
public IPAddressRange getAddressRange()
Returns the configured address ranges that are encapsulated by this object.
public Enumeration elements()
Returns an Enumeration that can be used to cycle over the range of pollable addresses.
public Iterator iterator()
Returns an Iterator object that can be used to cycle over the range of pollable address information.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |