Class PollStatus

    • 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

      • get

        public static PollStatus get​(int status,
                                     Double responseTime)

        get

        Parameters:
        status - a int.
        responseTime - a Double object.
        Returns:
        a PollStatus object.
      • unknown

        public static PollStatus unknown()
        Deprecated.
        We should specify a reason on every PollStatus object.
        Returns:
        a PollStatus object.
      • unresponsive

        public static PollStatus unresponsive()
        Deprecated.
        We should specify a reason on every PollStatus object.
        Returns:
        a PollStatus object.
      • down

        public static PollStatus down()
        Deprecated.
        We should specify a reason on every PollStatus object.
        Returns:
        a PollStatus object.
      • unavailable

        public static PollStatus unavailable()
        Deprecated.
        We should specify a reason on every PollStatus object.
        Returns:
        a PollStatus object.
      • hashCode

        public int hashCode()

        hashCode

        Overrides:
        hashCode in class Object
        Returns:
        a int.
      • isUp

        public boolean isUp()

        isUp

        Returns:
        a boolean.
      • isAvailable

        public boolean isAvailable()

        isAvailable

        Returns:
        a boolean.
      • isUnresponsive

        public boolean isUnresponsive()

        isUnresponsive

        Returns:
        a boolean.
      • isUnavailable

        public boolean isUnavailable()

        isUnavailable

        Returns:
        a boolean.
      • isDown

        public boolean isDown()

        isDown

        Returns:
        a boolean.
      • isUnknown

        public boolean isUnknown()

        isUnknown

        Returns:
        a boolean.
      • getTimestamp

        public Date getTimestamp()

        getTimestamp

        Returns:
        a Date object.
      • setTimestamp

        public void setTimestamp​(Date timestamp)

        setTimestamp

        Parameters:
        timestamp - a Date object.
      • getReason

        public String getReason()

        getReason

        Returns:
        a String object.
      • setReason

        public void setReason​(String reason)

        setReason

        Parameters:
        reason - a String object.
      • getResponseTime

        public Double getResponseTime()

        getResponseTime

        Returns:
        a Double object.
      • setResponseTime

        public void setResponseTime​(Double responseTime)

        setResponseTime

        Parameters:
        responseTime - a Double object.
      • getProperties

        public Map<String,​Number> getProperties()

        getProperties

        Returns:
        a Map object.
      • setProperties

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

        setProperties

        Parameters:
        p - a Map object.
      • getProperty

        public Number getProperty​(String key)

        getProperty

        Parameters:
        key - a String object.
        Returns:
        a Number object.
      • setProperty

        public void setProperty​(String key,
                                Number value)

        setProperty

        Parameters:
        key - a String object.
        value - a Number object.
      • getStatusCode

        public int getStatusCode()

        getStatusCode

        Returns:
        a int.
      • getStatusName

        public String getStatusName()

        getStatusName

        Returns:
        a String object.