@Property(name="hc.name",label="Name",description="Name of this health check.") @Property(name="hc.tags",unbounded=ARRAY,label="Tags",description="List of tags for this health check, used to select subsets of health checks for execution e.g. by a composite health check.") @Property(name="hc.mbean.name",label="MBean Name",description="Name of the MBean to create for this health check. If empty, no MBean is registered.") @Service(value=org.apache.sling.hc.api.HealthCheck.class) public class ScriptableHealthCheck extends Object implements org.apache.sling.hc.api.HealthCheck
HealthCheck
that checks a scriptable expressionModifier and Type | Field and Description |
---|---|
static String |
PROP_EXPRESSION |
static String |
PROP_LANGUAGE_EXTENSION |
Constructor and Description |
---|
ScriptableHealthCheck() |
Modifier and Type | Method and Description |
---|---|
protected void |
activate(org.osgi.service.component.ComponentContext ctx) |
void |
bindBindingsValuesProvider(org.apache.sling.scripting.api.BindingsValuesProvider bvp) |
org.apache.sling.hc.api.Result |
execute() |
void |
unbindBindingsValuesProvider(org.apache.sling.scripting.api.BindingsValuesProvider bvp) |
@Property(label="Expression", description="The value of this expression must be \"true\" for this check to be successful.") public static final String PROP_EXPRESSION
@Property(value="ecma", label="Language Extension", description="File extension of the language to use to evaluate the expression, for example \"ecma\" or \"groovy\", asssuming the corresponding script engine is available. By default \"ecma\" is used.") public static final String PROP_LANGUAGE_EXTENSION
@Activate protected void activate(org.osgi.service.component.ComponentContext ctx)
public org.apache.sling.hc.api.Result execute()
execute
in interface org.apache.sling.hc.api.HealthCheck
public void bindBindingsValuesProvider(org.apache.sling.scripting.api.BindingsValuesProvider bvp)
public void unbindBindingsValuesProvider(org.apache.sling.scripting.api.BindingsValuesProvider bvp)
Copyright © 2013–2017 The Apache Software Foundation. All rights reserved.