org.opennms.netmgt.model
Class PollStatus

java.lang.Object
  extended by org.opennms.netmgt.model.PollStatus
All Implemented Interfaces:
Serializable

public class PollStatus
extends Object
implements Serializable

Represents the status of a node, interface or services

Author:
brozow
See Also:
Serialized Form

Field Summary
static int SERVICE_AVAILABLE
           The constant that defines a service as being in a normal state.
static int SERVICE_UNAVAILABLE
           The constant that defines a service that is not working normally and should be scheduled using the downtime models.
static int SERVICE_UNKNOWN
          The constant the defines a status is unknown.
static int SERVICE_UNRESPONSIVE
           The constant that defines a service that is up but is most likely suffering due to excessive load or latency issues and because of that has not responded within the configured timeout period.
 
Method Summary
static PollStatus available()
           
static PollStatus available(Double responseTime)
           
static PollStatus decode(String statusName)
           
static PollStatus decode(String statusName, Double responseTime)
           
static PollStatus decode(String statusName, String reason)
           
static PollStatus decode(String statusName, String reason, Double responseTime)
           
static PollStatus down()
           
static PollStatus down(String reason)
           
 boolean equals(Object o)
           
static PollStatus get(int status, Double responseTime)
           
static PollStatus get(int status, String reason)
           
static PollStatus get(int status, String reason, Double responseTime)
           
 Map<String,Number> getProperties()
           
 Number getProperty(String key)
           
 String getReason()
           
 Double getResponseTime()
           
 int getStatusCode()
           
 String getStatusName()
           
 Date getTimestamp()
           
 int hashCode()
           
 boolean isAvailable()
           
 boolean isDown()
           
 boolean isUnavailable()
           
 boolean isUnknown()
           
 boolean isUnresponsive()
           
 boolean isUp()
           
 void setProperties(Map<String,Number> p)
           
 void setProperty(String key, Number value)
           
 void setReason(String reason)
           
 void setResponseTime(Double responseTime)
           
 void setTimestamp(Date timestamp)
           
 String toString()
           
static PollStatus unavailable()
           
static PollStatus unavailable(String reason)
           
static PollStatus unknown()
           
static PollStatus unknown(String reason)
           
static PollStatus unresponsive()
           
static PollStatus unresponsive(String reason)
           
static PollStatus up()
           
static PollStatus up(Double responseTime)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

SERVICE_UNRESPONSIVE

public static final int SERVICE_UNRESPONSIVE

The constant that defines a service that is up but is most likely suffering due to excessive load or latency issues and because of that has not responded within the configured timeout period.

See Also:
Constant Field Values

SERVICE_UNAVAILABLE

public static final int SERVICE_UNAVAILABLE

The constant that defines a service that is not working normally and should be scheduled using the downtime models.

See Also:
Constant Field Values

SERVICE_AVAILABLE

public static final int SERVICE_AVAILABLE

The constant that defines a service as being in a normal state. If this is returned by the poll() method then the framework will re-schedule the service for its next poll using the standard uptime interval

See Also:
Constant Field Values

SERVICE_UNKNOWN

public static final int SERVICE_UNKNOWN
The constant the defines a status is unknown. Used mostly internally

See Also:
Constant Field Values
Method Detail

decode

public static PollStatus decode(String statusName)

decode

public static PollStatus decode(String statusName,
                                String reason)

decode

public static PollStatus decode(String statusName,
                                Double responseTime)

decode

public static PollStatus decode(String statusName,
                                String reason,
                                Double responseTime)

get

public static PollStatus get(int status,
                             String reason)

get

public static PollStatus get(int status,
                             Double responseTime)

get

public static PollStatus get(int status,
                             String reason,
                             Double responseTime)

up

public static PollStatus up()

up

public static PollStatus up(Double responseTime)

available

public static PollStatus available()

available

public static PollStatus available(Double responseTime)

unknown

public static PollStatus unknown()

unknown

public static PollStatus unknown(String reason)

unresponsive

public static PollStatus unresponsive()

unresponsive

public static PollStatus unresponsive(String reason)

down

public static PollStatus down()

unavailable

public static PollStatus unavailable()

down

public static PollStatus down(String reason)

unavailable

public static PollStatus unavailable(String reason)

equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

isUp

public boolean isUp()

isAvailable

public boolean isAvailable()

isUnresponsive

public boolean isUnresponsive()

isUnavailable

public boolean isUnavailable()

isDown

public boolean isDown()

isUnknown

public boolean isUnknown()

toString

public String toString()
Overrides:
toString in class Object

getTimestamp

public Date getTimestamp()

setTimestamp

public void setTimestamp(Date timestamp)

getReason

public String getReason()

setReason

public void setReason(String reason)

getResponseTime

public Double getResponseTime()

setResponseTime

public void setResponseTime(Double responseTime)

getProperties

public Map<String,Number> getProperties()

setProperties

public void setProperties(Map<String,Number> p)

getProperty

public Number getProperty(String key)

setProperty

public void setProperty(String key,
                        Number value)

getStatusCode

public int getStatusCode()

getStatusName

public String getStatusName()


Copyright © 2009. All Rights Reserved.