com.caucho.health.predicate
Class IfMessage
java.lang.Object
com.caucho.health.predicate.AbstractHealthPredicate
com.caucho.health.predicate.AbstractScheduledHealthPredicate
com.caucho.health.predicate.AbstractHealthCheckPredicate
com.caucho.health.predicate.IfMessage
- All Implemented Interfaces:
- HealthPredicate
@Configurable
public class IfMessage
- extends AbstractHealthCheckPredicate
Qualifies an action to match health result message to a regular expression.
<health:HttpStatusHealthCheck ee:Named="httpStatusCheck">
<url>http://localhost:8080/test-ping.jsp</url>
</health:HttpStatusHealthCheck>
<health:Restart>
<health:IfHealthCritical/>
<health:IfMessage healthCheck="${httpStatusCheck}" regexp="Exception"/>
<health:Restart>
|
Field Summary |
protected java.util.regex.Pattern |
_regexp
|
|
Method Summary |
boolean |
isMatch(HealthEvent healthEvent)
The abstract match returns true, so a child can combine its own
matches with the parent. |
void |
setRegexp(java.util.regex.Pattern regexp)
Set health message match regular expression |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
_regexp
protected java.util.regex.Pattern _regexp
IfMessage
public IfMessage()
IfMessage
public IfMessage(java.util.regex.Pattern regexp)
setRegexp
@Configurable
public void setRegexp(java.util.regex.Pattern regexp)
- Set health message match regular expression
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