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
HealthCheckthat uses the last polling state fromScheduledPollConsumerwhen reporting the health.
-
-
Constructor Summary
Constructors Constructor Description ScheduledPollConsumerHealthCheck(ScheduledPollConsumer consumer, String id)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.apache.camel.health.HealthCheck.Resultcall(Map<String,Object> options)org.apache.camel.health.HealthCheckConfigurationgetConfiguration()StringgetGroup()StringgetId()booleanisDownBeforeFirstPoll()voidsetDownBeforeFirstPoll(boolean downBeforeFirstPoll)Whether the health check starts as DOWN before first poll (default true).
-
-
-
Constructor Detail
-
ScheduledPollConsumerHealthCheck
public ScheduledPollConsumerHealthCheck(ScheduledPollConsumer consumer, String id)
-
-
Method Detail
-
getConfiguration
public org.apache.camel.health.HealthCheckConfiguration getConfiguration()
- Specified by:
getConfigurationin interfaceorg.apache.camel.health.HealthCheck
-
call
public org.apache.camel.health.HealthCheck.Result call(Map<String,Object> options)
- Specified by:
callin interfaceorg.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:
getGroupin interfaceorg.apache.camel.spi.HasGroup
-
getId
public String getId()
- Specified by:
getIdin interfaceorg.apache.camel.spi.HasId
-
-