org.opennms.bb.dp.discovery.components
Class IPPollAddress

java.lang.Object
  |
  +--org.opennms.bb.dp.discovery.components.IPPollAddress

public class IPPollAddress
extends Object

An IPPollAddress contains an IP Address, retry count, an associated timeout, and the JSDT client name of the ICMP service monitor instance that generated the request. The address is stored in a dotted decimal format. The timeout should be stored in 1/1000th of a second.

Version:
$Revision: 1.5 $
Author:
Sowmya, OpenNMS

Field Summary
private  String m_address
          The dotted decimal IPv4 address for the poll.
private  String m_jsdtSenderName
          The JSDT client name of the ICMP service monitor instance that generated this request.
private  long m_retries
          The number of times to attempt to contact the remote.
private  long m_timeout
          The timeout for the poller in 1/1000th of a second.
 
Constructor Summary
private IPPollAddress()
          The default constructor is marked private and will always throw an UnsupportedOperationException.
  IPPollAddress(String ipAddress, long timeout, long retries)
          Constructs an IPPollAddress object with the specified parameters.
 
Method Summary
 boolean equals(IPPollAddress pollAddr)
          Returns true if the passed object is equal to self.
 String getAddress()
          Returns the current IPv4 address for this object in the dotted decimal format.
 long getRetries()
          Returns the current number of retries set for this address.
 String getSenderName()
          Returns the JSDT client name associated with the ICMP service monitor responsible for generating this request.
 long getTimeout()
          Returns the timeout in 1/1000th of a second increments.
 void setSenderName(String sender)
           Sets the JSDT client name associated with this request
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

m_jsdtSenderName

private String m_jsdtSenderName
The JSDT client name of the ICMP service monitor instance that generated this request. This string is used to send the poll result back to the correct service monitor instance.

m_address

private String m_address
The dotted decimal IPv4 address for the poll.

m_timeout

private long m_timeout
The timeout for the poller in 1/1000th of a second.

m_retries

private long m_retries
The number of times to attempt to contact the remote.
Constructor Detail

IPPollAddress

private IPPollAddress()
               throws UnsupportedOperationException

The default constructor is marked private and will always throw an UnsupportedOperationException. This is to prevent the use of the default constructor.

Throws:
UnsupportedOperationException - Always thrown.

IPPollAddress

public IPPollAddress(String ipAddress,
                     long timeout,
                     long 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

getTimeout

public long getTimeout()

Returns the timeout in 1/1000th of a second increments.


getRetries

public long getRetries()

Returns the current number of retries set for this address.


getAddress

public String getAddress()

Returns the current IPv4 address for this object in the dotted decimal format.


getSenderName

public String getSenderName()

Returns the JSDT client name associated with the ICMP service monitor responsible for generating this request.


setSenderName

public void setSenderName(String sender)

Sets the JSDT client name associated with this request

Parameters:
sender - The JSDT client name which sent this request.

equals

public boolean equals(IPPollAddress pollAddr)

Returns true if the passed object is equal to self. The objects must be equal in address, timeout, and the number of retries.

Returns:
True if the objects are logically equal. False is returned otherwise.