Class ScheduledPollConsumerHealthCheck

  • All Implemented Interfaces:
    org.apache.camel.health.HealthCheck, org.apache.camel.Ordered, org.apache.camel.spi.HasGroup, org.apache.camel.spi.HasId

    public class ScheduledPollConsumerHealthCheck
    extends Object
    implements org.apache.camel.health.HealthCheck
    HealthCheck that uses the last polling state from ScheduledPollConsumer when reporting the health.
    • Nested Class Summary

      • Nested classes/interfaces inherited from interface org.apache.camel.health.HealthCheck

        org.apache.camel.health.HealthCheck.Kind, org.apache.camel.health.HealthCheck.Result, org.apache.camel.health.HealthCheck.State
    • Field Summary

      • Fields inherited from interface org.apache.camel.health.HealthCheck

        CHECK_ENABLED, CHECK_GROUP, CHECK_ID, CHECK_KIND, ENDPOINT_URI, FAILURE_COUNT, FAILURE_ENDPOINT_URI, FAILURE_ERROR_COUNT, FAILURE_START_TIME, FAILURE_TIME, HTTP_RESPONSE_CODE, INVOCATION_ATTEMPT_TIME, INVOCATION_COUNT, INVOCATION_TIME, SUCCESS_COUNT, SUCCESS_START_TIME, SUCCESS_TIME
      • Fields inherited from interface org.apache.camel.Ordered

        HIGHEST, LOWEST
    • Method Detail

      • isEnabled

        public boolean isEnabled()
        Specified by:
        isEnabled in interface org.apache.camel.health.HealthCheck
      • setEnabled

        public void setEnabled​(boolean enabled)
        Specified by:
        setEnabled in interface org.apache.camel.health.HealthCheck
      • call

        public org.apache.camel.health.HealthCheck.Result call​(Map<String,​Object> options)
        Specified by:
        call in interface org.apache.camel.health.HealthCheck
      • getInitialState

        public org.apache.camel.health.HealthCheck.State getInitialState()
      • setInitialState

        public void setInitialState​(org.apache.camel.health.HealthCheck.State initialState)
        Used to allow special consumers to override the initial state of the health check (readiness check) during startup. Consumers that are internal only such as camel-scheduler uses UP as initial state because the scheduler may be configured to run only very in-frequently and therefore the overall health-check state would be affected and seen as DOWN.
      • getGroup

        public String getGroup()
        Specified by:
        getGroup in interface org.apache.camel.spi.HasGroup
      • getId

        public String getId()
        Specified by:
        getId in interface org.apache.camel.spi.HasId