com.caucho.health.predicate
Class And

java.lang.Object
  extended by com.caucho.health.predicate.AbstractHealthPredicate
      extended by com.caucho.health.predicate.AbstractCombiningPredicate
          extended by com.caucho.health.predicate.And
All Implemented Interfaces:
HealthActionAware, HealthPredicate

@Configurable
public class And
extends AbstractCombiningPredicate

Matches if all of the child predicates match.

Note: 'And' is the default and thus not strictly necessary in the example below.

<health:HttpStatusHealthCheck ee:Named="httpCheck1">
   <url>http://localhost:8080/check1.jsp</url>
 </health:HttpStatusHealthCheck>
 
 <health:HttpStatusHealthCheck ee:Named="httpCheck2">
   <url>http://localhost:8080/check2.jsp</url>
 </health:HttpStatusHealthCheck>
 
 <health:Restart>
   <health:And>
     <health:IfHealthCritical healthCheck="${httpCheck1}"/>
     <health:IfHealthCritical healthCheck="${httpCheck2}"/>
   </health:And>
 </health:Restart>
 


Constructor Summary
And()
           
 
Method Summary
 boolean isMatch(HealthEvent healthEvent)
          Matches children with logical AND operation
 
Methods inherited from class com.caucho.health.predicate.AbstractCombiningPredicate
add, getPredicates, init, setAction
 
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

And

public And()
Method Detail

isMatch

public boolean isMatch(HealthEvent healthEvent)
Matches children with logical AND operation

Specified by:
isMatch in interface HealthPredicate
Overrides:
isMatch in class AbstractHealthPredicate