com.caucho.health.predicate
Class Not

java.lang.Object
  extended by com.caucho.health.predicate.AbstractHealthPredicate
      extended by com.caucho.health.predicate.Not
All Implemented Interfaces:
HealthPredicate

@Configurable
public class Not
extends AbstractHealthPredicate

Matches if the child predicate is false.

Complex tests can be built using <health:Not>, <health:And> and <helth:Or> on top of simpler primary predicates.

<health:HttpStatusHealthCheck ee:Named="httpStatusCheck">
   <url>http://localhost:8080/test-ping.jsp</url>
 </health:HttpStatusHealthCheck>
 
 <health:Restart>
   <health:IfHealthCritical healthCheck="${httpStatusCheck}"/>
   <health:Not>
     <health:IfRecovered/>
   </health:Not>
 </health:Restart>
 


Constructor Summary
Not()
           
Not(HealthPredicate predicate)
           
 
Method Summary
 void add(HealthPredicate predicate)
          Add a child predicate.
 void init()
           
 boolean isMatch(HealthEvent healthEvent)
          True if child predicate does not match.
 
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

Not

public Not()

Not

public Not(HealthPredicate predicate)
Method Detail

add

public void add(HealthPredicate predicate)
Add a child predicate. The child must fail for Not to pass.

Parameters:
predicate - the child predicate

init

@PostConstruct
public void init()

isMatch

public boolean isMatch(HealthEvent healthEvent)
True if child predicate does not match.

Specified by:
isMatch in interface HealthPredicate
Overrides:
isMatch in class AbstractHealthPredicate
Parameters:
request - the servlet request to test