org.opennms.netmgt.model
Class PollStatus

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

public class PollStatus
extends java.lang.Object
implements java.io.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(long responseTime)
           
static PollStatus decode(java.lang.String statusName)
           
static PollStatus decode(java.lang.String statusName, long responseTime)
           
static PollStatus decode(java.lang.String statusName, java.lang.String reason)
           
static PollStatus decode(java.lang.String statusName, java.lang.String reason, long responseTime)
           
static PollStatus down()
           
static PollStatus down(java.lang.String reason)
           
 boolean equals(java.lang.Object o)
           
static PollStatus get(int status, java.lang.String reason)
           
static PollStatus get(int status, java.lang.String reason, long responseTime)
           
 java.lang.String getReason()
           
 long getResponseTime()
           
 int getStatusCode()
           
 java.lang.String getStatusName()
           
 java.util.Date getTimestamp()
           
 int hashCode()
           
 boolean isAvailable()
           
 boolean isDown()
           
 boolean isUnavailable()
           
 boolean isUnresponsive()
           
 boolean isUp()
           
 void setReason(java.lang.String reason)
           
 void setResponseTime(long responseTime)
           
 void setTimestamp(java.util.Date timestamp)
           
 java.lang.String toString()
           
static PollStatus unavailable()
           
static PollStatus unavailable(java.lang.String reason)
           
static PollStatus unknown()
           
static PollStatus unknown(java.lang.String reason)
           
static PollStatus unresponsive()
           
static PollStatus unresponsive(java.lang.String reason)
           
static PollStatus up()
           
static PollStatus up(long 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(java.lang.String statusName)

decode

public static PollStatus decode(java.lang.String statusName,
                                java.lang.String reason)

decode

public static PollStatus decode(java.lang.String statusName,
                                long responseTime)

decode

public static PollStatus decode(java.lang.String statusName,
                                java.lang.String reason,
                                long responseTime)

get

public static PollStatus get(int status,
                             java.lang.String reason)

get

public static PollStatus get(int status,
                             java.lang.String reason,
                             long responseTime)

up

public static PollStatus up()

up

public static PollStatus up(long responseTime)

available

public static PollStatus available()

available

public static PollStatus available(long responseTime)

unknown

public static PollStatus unknown()

unknown

public static PollStatus unknown(java.lang.String reason)

unresponsive

public static PollStatus unresponsive()

unresponsive

public static PollStatus unresponsive(java.lang.String reason)

down

public static PollStatus down()

unavailable

public static PollStatus unavailable()

down

public static PollStatus down(java.lang.String reason)

unavailable

public static PollStatus unavailable(java.lang.String reason)

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

isUp

public boolean isUp()

isAvailable

public boolean isAvailable()

isUnresponsive

public boolean isUnresponsive()

isUnavailable

public boolean isUnavailable()

isDown

public boolean isDown()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getTimestamp

public java.util.Date getTimestamp()

setTimestamp

public void setTimestamp(java.util.Date timestamp)

getReason

public java.lang.String getReason()

setReason

public void setReason(java.lang.String reason)

getResponseTime

public long getResponseTime()

setResponseTime

public void setResponseTime(long responseTime)

getStatusCode

public int getStatusCode()

getStatusName

public java.lang.String getStatusName()


Copyright © 2007. All Rights Reserved.