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.Result, org.apache.camel.health.HealthCheck.State
    • Field Summary

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

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

        HIGHEST, LOWEST
    • Method Detail

      • getConfiguration

        public org.apache.camel.health.HealthCheckConfiguration getConfiguration()
        Specified by:
        getConfiguration 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
      • isDownBeforeFirstPoll

        public boolean isDownBeforeFirstPoll()
      • setDownBeforeFirstPoll

        public void setDownBeforeFirstPoll​(boolean downBeforeFirstPoll)
        Whether the health check starts as DOWN before first poll (default true). This can be set to false for consumers that should be UP from the start. For example scheduled consumer which may run their first poll after a long time.
      • 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