org.apache.james.transport.matchers
Class CompareNumericHeaderValue
java.lang.Object
org.apache.mailet.base.GenericMatcher
org.apache.james.transport.matchers.CompareNumericHeaderValue
- All Implemented Interfaces:
- Matcher, MatcherConfig
public class CompareNumericHeaderValue
- extends GenericMatcher
Matches mails containing a header with a numeric value whose comparison with the specified value is true.
If the header is missing in the message, there will be no match
Configuration string: The headerName, a comparison operator and the numeric headerValue
to compare with, space or tab delimited.
The comparison operators are: <, <=, ==, >=, >
;
another set of operators is: LT, LE, EQ, GE, GT
.
Also the following operators are accepted: =<, =, =>
.
Example:
<mailet match="CompareNumericHeaderValue=X-MessageIsSpamProbability > 0.9" class="ToProcessor">
<processor> spam </processor>
</mailet>
- Since:
- 2.2.0
- Version:
- CVS $Revision: 713949 $ $Date: 2008-11-14 07:40:21 +0000 (Fri, 14 Nov 2008) $
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CompareNumericHeaderValue
public CompareNumericHeaderValue()
init
public void init()
throws javax.mail.MessagingException
- Overrides:
init
in class GenericMatcher
- Throws:
javax.mail.MessagingException
- See Also:
GenericMatcher
match
public java.util.Collection match(Mail mail)
throws javax.mail.MessagingException
- Specified by:
match
in interface Matcher
- Specified by:
match
in class GenericMatcher
- Throws:
javax.mail.MessagingException
- See Also:
GenericMatcher
Copyright © 2008-2009 The Apache Software Foundation. All Rights Reserved.