Class AbstractSpamFilter
java.lang.Object
tigase.spam.filters.AbstractSpamFilter
- All Implemented Interfaces:
SpamFilter
- Direct Known Subclasses:
KnownSpammersFilter, MessageErrorFilterEnsureErrorChild, MessageFilterSameLongBody, MucMessageFilterEnsureToFullJid, PresenceSubscribeFilter, PresenceSubscribeOutgoingFilter
Created by andrzej on 13.04.2017.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanfilter(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(String name, tigase.stats.StatisticsList list) Method should fill thelistparameter value with statistics about processed stanzas.toString()Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface SpamFilter
getId, getSpamProbability
-
Constructor Details
-
AbstractSpamFilter
public AbstractSpamFilter()
-
-
Method Details
-
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
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
-