com.limegroup.gnutella.filters
Class KeywordFilter

java.lang.Object
  extended bycom.limegroup.gnutella.filters.SpamFilter
      extended bycom.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.


Constructor Summary
KeywordFilter()
           
 
Method Summary
 boolean allow(Message m)
          Returns true iff this is considered spam and should not be processed.
protected  boolean allow(QueryReply qr)
           
protected  boolean allow(QueryRequest qr)
           
 void disallow(java.lang.String phrase)
           
 void disallowAdult()
           
 void disallowHtml()
           
 void disallowVbs()
           
protected  boolean matches(java.lang.String phrase)
          Returns true if phrase matches any of the entries in ban.
 
Methods inherited from class com.limegroup.gnutella.filters.SpamFilter
newPersonalFilter, newRouteFilter
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

KeywordFilter

public KeywordFilter()
Method Detail

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.