Class IPPollAddress
- java.lang.Object
-
- org.opennms.netmgt.model.discovery.IPPollAddress
-
- All Implemented Interfaces:
Serializable
public class IPPollAddress extends Object implements Serializable
This class is used to represent the polling information needed by the discovery process. Each instance encapsulates an internet address, timeout in milliseconds, and a retry count.
- Author:
- Sowmya , Brian Weaver
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description IPPollAddress(String foreignSource, String location, InetAddress ipAddress, long timeout, int retries)Constructs an IPPollAddress object with the specified parameters.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object object)Returns true if the passed object is equal to self.InetAddressgetAddress()Returns the internet address encapsulated in the object.StringgetForeignSource()Foreign source where this address should be persisted.StringgetLocation()Network location of this address.intgetRetries()Returns the current number of retries set for this address.longgetTimeout()Returns the timeout in 1/1000th of a second increments.StringtoString()
-
-
-
Constructor Detail
-
IPPollAddress
public IPPollAddress(String foreignSource, String location, InetAddress ipAddress, long timeout, int retries)
Constructs an IPPollAddress object with the specified parameters.
- Parameters:
ipAddress- The Dotted Decimal IPv4 Address.timeout- The timeout between retries in 1/1000th of a second.retries- The number of times to attempt to contact the address.
-
-
Method Detail
-
getForeignSource
public String getForeignSource()
Foreign source where this address should be persisted.
-
getLocation
public String getLocation()
Network location of this address.
-
getTimeout
public long getTimeout()
Returns the timeout in 1/1000th of a second increments.
- Returns:
- The timeout associated with the host in 1/1000th of a second.
-
getRetries
public int getRetries()
Returns the current number of retries set for this address.
- Returns:
- The retry count for the instance.
-
getAddress
public InetAddress getAddress()
Returns the internet address encapsulated in the object.- Returns:
- The encapsulated internet address.
-
equals
public boolean equals(Object object)
Returns true if the passed object is equal to self. The objects must be equal in address, timeout, and the number of retries.
- Overrides:
equalsin classObject- Parameters:
pollAddr- aIPPollAddressobject.- Returns:
- True if the objects are logically equal. False is returned otherwise.
-
-