Package org.apache.camel.support
Class ScheduledPollConsumerHealthCheck
java.lang.Object
org.apache.camel.support.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_TIMEFields inherited from interface org.apache.camel.Ordered
HIGHEST, LOWEST -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.camel.health.HealthCheck.ResultgetGroup()getId()org.apache.camel.health.HealthCheck.StatebooleanvoidsetEnabled(boolean enabled) voidsetInitialState(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.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.camel.health.HealthCheck
call, callLiveness, callReadiness, getMetaData, getOrder, isLiveness, isReadiness
-
Constructor Details
-
ScheduledPollConsumerHealthCheck
-
-
Method Details
-
isEnabled
public boolean isEnabled()- Specified by:
isEnabledin interfaceorg.apache.camel.health.HealthCheck
-
setEnabled
public void setEnabled(boolean enabled) - Specified by:
setEnabledin interfaceorg.apache.camel.health.HealthCheck
-
call
- Specified by:
callin interfaceorg.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
- Specified by:
getGroupin interfaceorg.apache.camel.spi.HasGroup
-
getId
- Specified by:
getIdin interfaceorg.apache.camel.spi.HasId
-