Package tigase.spam.filters
Class AbstractSpamFilter
- java.lang.Object
-
- tigase.spam.filters.AbstractSpamFilter
-
- All Implemented Interfaces:
SpamFilter
- Direct Known Subclasses:
KnownSpammersFilter,MessageErrorFilterEnsureErrorChild,MessageFilterSameLongBody,MucMessageFilterEnsureToFullJid,PresenceSubscribeFilter,PresenceSubscribeOutgoingFilter
public abstract class AbstractSpamFilter extends java.lang.Object implements SpamFilter
Created by andrzej on 13.04.2017.
-
-
Constructor Summary
Constructors Constructor Description AbstractSpamFilter()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description booleanfilter(tigase.server.Packet packet, tigase.xmpp.XMPPResourceConnection session)Method processes packet and checks if it is a SPAM or notprotected abstract booleanfilterPacket(tigase.server.Packet packet, tigase.xmpp.XMPPResourceConnection session)voidgetStatistics(java.lang.String name, tigase.stats.StatisticsList list)Method should fill thelistparameter value with statistics about processed stanzas.java.lang.StringtoString()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface tigase.spam.SpamFilter
getId, getSpamProbability
-
-
-
-
Method Detail
-
filter
public boolean filter(tigase.server.Packet packet, tigase.xmpp.XMPPResourceConnection session)Description copied from interface:SpamFilterMethod processes packet and checks if it is a SPAM or not- Specified by:
filterin interfaceSpamFilter- Returns:
- false if message should be dropped as it it a SPAM
-
getStatistics
public void getStatistics(java.lang.String name, tigase.stats.StatisticsList list)Description copied from interface:SpamFilterMethod should fill thelistparameter value with statistics about processed stanzas. Default implementation should be used if there are no meaningful values to return.- Specified by:
getStatisticsin interfaceSpamFilter
-
filterPacket
protected abstract boolean filterPacket(tigase.server.Packet packet, tigase.xmpp.XMPPResourceConnection session)
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-