Class HealthCheckMetadata
java.lang.Object
org.apache.felix.hc.api.execution.HealthCheckMetadata
This class helps retrieving meta data information about a health check service.
- Since:
- 1.1
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a HealthCheckMetadata from an OSGi service based on the service properties. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Return the cron expression used for asynchronous execution.Return the interval in sec used for asynchronous execution.Makes non-ok results stick for the given amount of time.The mbean name of the health check as defined through theHealthCheck.MBEAN_NAME
property.getName()
The name of the health check as defined through theHealthCheck.NAME
property.TTL for the result cache in ms.long
Return the service id.Get the service reference.getTags()
Return the list of defined tags for this check as set throughtags
getTitle()
The title of the health check.int
hashCode()
toString()
-
Constructor Details
-
HealthCheckMetadata
Creates a HealthCheckMetadata from an OSGi service based on the service properties.- Parameters:
ref
- the ServiceReference for the HC service
-
-
Method Details
-
getName
The name of the health check as defined through theHealthCheck.NAME
property.- Returns:
- The name or
null
-
getMBeanName
The mbean name of the health check as defined through theHealthCheck.MBEAN_NAME
property.- Returns:
- The mbean name or
null
-
getTitle
The title of the health check. If the health check has a name, this is used as the title. Otherwise the description, PID and service ID are checked for values.- Returns:
- The computed title
-
getTags
Return the list of defined tags for this check as set throughtags
- Returns:
- list of tags (may be empty but never returns
null
)
-
getAsyncCronExpression
Return the cron expression used for asynchronous execution.- Returns:
- the async cron expression (or
null
if not set)
-
getAsyncIntervalInSec
Return the interval in sec used for asynchronous execution.- Returns:
- the async interval (or
null
if not set)
-
getServiceId
public long getServiceId()Return the service id.- Returns:
- the service id (never
null
)
-
getServiceReference
Get the service reference.- Returns:
- the service reference (never
null
)
-
getResultCacheTtlInMs
TTL for the result cache in ms.- Returns:
- TTL for the result cache or
null
if not configured.
-
getKeepNonOkResultsStickyForSec
Makes non-ok results stick for the given amount of time.- Returns:
- Time to make non-ok results sticky in seconds.
-
hashCode
public int hashCode() -
equals
-
toString
-