com.caucho.health.predicate
Class IfExpr

java.lang.Object
  extended by com.caucho.health.predicate.AbstractHealthPredicate
      extended by com.caucho.health.predicate.AbstractScheduledHealthPredicate
          extended by 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>
 


Constructor Summary
IfExpr()
           
 
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 com.caucho.health.predicate.AbstractHealthPredicate
toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

IfExpr

public IfExpr()
Method Detail

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