Package org.apache.camel.health
Interface HealthCheck
Health check
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enumstatic interfaceResponse to a health check invocation.static enum -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final StringDeprecated.static final Stringstatic final Stringstatic final Stringstatic final Stringstatic final StringDeprecated.static final Stringstatic final Stringstatic final Stringstatic final Stringstatic final String -
Method Summary
Modifier and TypeMethodDescriptiondefault HealthCheck.Resultcall()Invoke the check.Invoke the check.default HealthCheck.ResultInvoke the check as liveness check.default HealthCheck.ResultInvoke the check as readiness check.Return metadata associated with thisHealthCheck.default intgetOrder()Gets the order.booleanWhether this health check is enableddefault booleanWhether this health check can be used for liveness checks Liveness check is not default, and must be explicit enabled.default booleanWhether this health check can be used for readiness checks.voidsetEnabled(boolean enabled) Used for enabling or disabling this health check
-
Field Details
-
CHECK_ID
- See Also:
-
CHECK_GROUP
- See Also:
-
CHECK_KIND
- See Also:
-
CHECK_ENABLED
- See Also:
-
INVOCATION_COUNT
- See Also:
-
INVOCATION_TIME
- See Also:
-
INVOCATION_ATTEMPT_TIME
Deprecated.- See Also:
-
FAILURE_COUNT
- See Also:
-
FAILURE_START_TIME
- See Also:
-
FAILURE_TIME
- See Also:
-
FAILURE_ERROR_COUNT
- See Also:
-
ENDPOINT_URI
- See Also:
-
SUCCESS_COUNT
- See Also:
-
SUCCESS_START_TIME
- See Also:
-
SUCCESS_TIME
- See Also:
-
HTTP_RESPONSE_CODE
- See Also:
-
FAILURE_ENDPOINT_URI
Deprecated.Use ENDPOINT_URI- See Also:
-
-
Method Details
-
getOrder
default int getOrder()Description copied from interface:OrderedGets the order. Use low numbers for higher priority. Normally the sorting will start from 0 and move upwards. So if you want to be last then useInteger.MAX_VALUEor egOrdered.LOWEST. -
isEnabled
boolean isEnabled()Whether this health check is enabled -
setEnabled
void setEnabled(boolean enabled) Used for enabling or disabling this health check -
getMetaData
Return metadata associated with thisHealthCheck. -
isReadiness
default boolean isReadiness()Whether this health check can be used for readiness checks. Readiness check is default. -
isLiveness
default boolean isLiveness()Whether this health check can be used for liveness checks Liveness check is not default, and must be explicit enabled. -
call
Invoke the check.- See Also:
-
callReadiness
Invoke the check as readiness check.- See Also:
-
callLiveness
Invoke the check as liveness check.- See Also:
-
call
Invoke the check. The implementation is responsible to eventually perform the check according to the limitation of the third party system i.e. it should not be performed too often to avoid rate limiting. The options argument can be used to pass information specific to the check like forcing the check to be performed against the policies. The implementation is responsible to catch and handle any exception thrown by the underlying technology, including unchecked ones.
-