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 boolean
filter(tigase.server.Packet packet, tigase.xmpp.XMPPResourceConnection session)
Method processes packet and checks if it is a SPAM or notprotected abstract boolean
filterPacket(tigase.server.Packet packet, tigase.xmpp.XMPPResourceConnection session)
void
getStatistics(java.lang.String name, tigase.stats.StatisticsList list)
Method should fill thelist
parameter value with statistics about processed stanzas.java.lang.String
toString()
-
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:SpamFilter
Method processes packet and checks if it is a SPAM or not- Specified by:
filter
in 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:SpamFilter
Method should fill thelist
parameter value with statistics about processed stanzas. Default implementation should be used if there are no meaningful values to return.- Specified by:
getStatistics
in interfaceSpamFilter
-
filterPacket
protected abstract boolean filterPacket(tigase.server.Packet packet, tigase.xmpp.XMPPResourceConnection session)
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-