com.limegroup.gnutella.filters
Class KeywordFilter
java.lang.Object
com.limegroup.gnutella.filters.SpamFilter
com.limegroup.gnutella.filters.KeywordFilter
- public class KeywordFilter
- extends SpamFilter
A spam filter that removes certain "bad" keywords.
If any words in a query are in the banned set, the
query is disallowed.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
KeywordFilter
public KeywordFilter()
disallow
public void disallow(java.lang.String phrase)
disallowAdult
public void disallowAdult()
disallowVbs
public void disallowVbs()
disallowHtml
public void disallowHtml()
allow
public boolean allow(Message m)
- Description copied from class:
SpamFilter
- Returns true iff this is considered spam and should not be processed.
- Specified by:
allow
in class SpamFilter
allow
protected boolean allow(QueryRequest qr)
allow
protected boolean allow(QueryReply qr)
matches
protected boolean matches(java.lang.String phrase)
- Returns true if phrase matches any of the entries in ban.