org.opennms.bb.dp.poller.plugins
Class PollResponseAddress

java.lang.Object
  |
  +--org.opennms.bb.dp.poller.plugins.PollResponseAddress

public class PollResponseAddress
extends Object

A PollResponseAddress contains an IP Address and a poll status. The address is stored in a dotted decimal format. The status indicates the result of the poll and should be one of two strings: "available" or "unavailable".

Version:
$Revision: 1.1 $
Author:
Mike, OpenNMS

Field Summary
private  String m_address
          The dotted decimal IPv4 address on which the poll was performed.
private  String m_status
          The status of the polled service.
static String STATUS_AVAILABLE
          Indicates poll response was positive for this address
static String STATUS_UNAVAILABLE
          Indicates poll response was negative for this address
 
Constructor Summary
private PollResponseAddress()
          The default constructor is marked private and will always throw an UnsupportedOperationException.
  PollResponseAddress(String ipAddress, String status)
          Constructs a PollResponseAddress object with the specified parameters.
 
Method Summary
 boolean equals(PollResponseAddress 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.
 String getStatus()
          Returns the status.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

STATUS_AVAILABLE

public static final String STATUS_AVAILABLE
Indicates poll response was positive for this address

STATUS_UNAVAILABLE

public static final String STATUS_UNAVAILABLE
Indicates poll response was negative for this address

m_address

private String m_address
The dotted decimal IPv4 address on which the poll was performed.

m_status

private String m_status
The status of the polled service.
Constructor Detail

PollResponseAddress

private PollResponseAddress()
                     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.

PollResponseAddress

public PollResponseAddress(String ipAddress,
                           String status)

Constructs a PollResponseAddress object with the specified parameters.

Parameters:
ipAddress - The Dotted Decimal IPv4 Address.
status - The status of the polled service.
Method Detail

getStatus

public String getStatus()

Returns the status.


getAddress

public String getAddress()

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


equals

public boolean equals(PollResponseAddress pollAddr)

Returns true if the passed object is equal to self. The objects must be equal in address, and status.

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