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 fromScheduledPollConsumer
when 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.Result
call(Map<String,Object> options)
org.apache.camel.health.HealthCheckConfiguration
getConfiguration()
String
getGroup()
String
getId()
boolean
isDownBeforeFirstPoll()
void
setDownBeforeFirstPoll(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:
getConfiguration
in interfaceorg.apache.camel.health.HealthCheck
-
call
public org.apache.camel.health.HealthCheck.Result call(Map<String,Object> options)
- Specified by:
call
in 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:
getGroup
in interfaceorg.apache.camel.spi.HasGroup
-
getId
public String getId()
- Specified by:
getId
in interfaceorg.apache.camel.spi.HasId
-
-