com.caucho.health.predicate
Class IfExpr
java.lang.Object
com.caucho.health.predicate.AbstractHealthPredicate
com.caucho.health.predicate.AbstractScheduledHealthPredicate
com.caucho.health.predicate.IfExpr
- All Implemented Interfaces:
- HealthPredicate
@Configurable
public class IfExpr
- extends AbstractScheduledHealthPredicate
Qualifies an action to execute based on the evaluation of an JSP EL
expression. Expression can include references to system properties, config
properties, and JMX mbean attributes.
<health:DumpHeap>
<health:IfExpr test="${resin.professional}"/>
</health:DumpHeap>
<health:DumpHeap>
<health:IfExpr test="${mbean('java.lang:type=OperatingSystem').AvailableProcessors >= 1}"/>
</health:DumpHeap>
<health:DumpHeap>
<health:IfExpr test="${user.timezone eq 'PST'}"/>
</health:DumpHeap>
|
Method Summary |
Expr |
getTest()
|
void |
init()
|
boolean |
isMatch(HealthEvent healthEvent)
The abstract match returns true, so a child can combine its own
matches with the parent. |
void |
setTest(Expr test)
Sets the JSP-EL expression value |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
IfExpr
public IfExpr()
init
@PostConstruct
public void init()
getTest
public Expr getTest()
setTest
@Configurable
public void setTest(Expr test)
- Sets the JSP-EL expression value
isMatch
public boolean isMatch(HealthEvent healthEvent)
- Description copied from class:
AbstractHealthPredicate
- The abstract match returns true, so a child can combine its own
matches with the parent. See AbstractScheduledCheckPredicate for a
case where the parent
isMatch doesn't return true.
- Specified by:
isMatch in interface HealthPredicate- Overrides:
isMatch in class AbstractScheduledHealthPredicate