Package org.apache.camel.health
Interface HealthCheck
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceHealthCheck.ResultResponse to a health check invocation.static classHealthCheck.State
-
Field Summary
Fields Modifier and Type Field Description static StringCHECK_ENABLEDstatic StringCHECK_GROUPstatic StringCHECK_IDstatic StringENDPOINT_URIstatic StringFAILURE_COUNTstatic StringFAILURE_ENDPOINT_URIDeprecated.static StringFAILURE_ERROR_COUNTstatic StringHTTP_RESPONSE_CODEstatic StringINVOCATION_ATTEMPT_TIMEstatic StringINVOCATION_COUNTstatic StringINVOCATION_TIMEstatic StringSUCCESS_COUNT
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default HealthCheck.Resultcall()Invoke the check.HealthCheck.Resultcall(Map<String,Object> options)Invoke the check.HealthCheckConfigurationgetConfiguration()Return the configuration associated with thisHealthCheck.default Map<String,Object>getMetaData()Return metadata associated with thisHealthCheck.default intgetOrder()Gets the order.default booleanisLiveness()Whether this health check can be used for liveness checksdefault booleanisReadiness()Whether this health check can be used for readiness checks
-
-
-
Field Detail
-
CHECK_ID
static final String CHECK_ID
- See Also:
- Constant Field Values
-
CHECK_GROUP
static final String CHECK_GROUP
- See Also:
- Constant Field Values
-
CHECK_ENABLED
static final String CHECK_ENABLED
- See Also:
- Constant Field Values
-
INVOCATION_COUNT
static final String INVOCATION_COUNT
- See Also:
- Constant Field Values
-
INVOCATION_TIME
static final String INVOCATION_TIME
- See Also:
- Constant Field Values
-
INVOCATION_ATTEMPT_TIME
static final String INVOCATION_ATTEMPT_TIME
- See Also:
- Constant Field Values
-
FAILURE_COUNT
static final String FAILURE_COUNT
- See Also:
- Constant Field Values
-
ENDPOINT_URI
static final String ENDPOINT_URI
- See Also:
- Constant Field Values
-
FAILURE_ERROR_COUNT
static final String FAILURE_ERROR_COUNT
- See Also:
- Constant Field Values
-
SUCCESS_COUNT
static final String SUCCESS_COUNT
- See Also:
- Constant Field Values
-
HTTP_RESPONSE_CODE
static final String HTTP_RESPONSE_CODE
- See Also:
- Constant Field Values
-
FAILURE_ENDPOINT_URI
@Deprecated static final String FAILURE_ENDPOINT_URI
Deprecated.Use ENDPOINT_URI- See Also:
- Constant Field Values
-
-
Method Detail
-
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.
-
getMetaData
default Map<String,Object> getMetaData()
Return metadata associated with thisHealthCheck.
-
isReadiness
default boolean isReadiness()
Whether this health check can be used for readiness checks
-
isLiveness
default boolean isLiveness()
Whether this health check can be used for liveness checks
-
getConfiguration
HealthCheckConfiguration getConfiguration()
Return the configuration associated with thisHealthCheck.
-
call
default HealthCheck.Result call()
Invoke the check.- See Also:
call(Map)
-
call
HealthCheck.Result call(Map<String,Object> options)
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.
-
-