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