Class MessageFilterSameLongBody
java.lang.Object
tigase.spam.filters.AbstractSpamFilter
tigase.spam.filters.MessageFilterSameLongBody
- All Implemented Interfaces:
SpamFilter
@Bean(name="message-same-long-body",
parent=SpamProcessor.class,
active=true)
public class MessageFilterSameLongBody
extends AbstractSpamFilter
Created by andrzej on 08.04.2017.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanfilterPacket(tigase.server.Packet packet, tigase.xmpp.XMPPResourceConnection session) getId()Method returns ID of a filterdoubleMethod returns probability of detection of a spammer.voidgetStatistics(String name, tigase.stats.StatisticsList list) Method should fill thelistparameter value with statistics about processed stanzas.protected booleanshouldSkipBodyCheck(tigase.server.Packet packet) Methods inherited from class AbstractSpamFilter
filter, toString
-
Field Details
-
ID
- See Also:
-
-
Constructor Details
-
MessageFilterSameLongBody
public MessageFilterSameLongBody()
-
-
Method Details
-
getId
-
getSpamProbability
public double getSpamProbability()Description copied from interface:SpamFilterMethod returns probability of detection of a spammer. If value is closer to 1 this means that it is more likely that sender of stanza marked by this filter as a spam is a spammer and should be blocked. This value is used byResultsAwareSpamFilterimplementation to decide if sender of a stanza should be blocked (ie. using number of blocked messages within a period of time and spammer detection probability returned by this method.- Returns:
- values between 0 and 1
-
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- Overrides:
getStatisticsin classAbstractSpamFilter
-
shouldSkipBodyCheck
protected boolean shouldSkipBodyCheck(tigase.server.Packet packet) -
filterPacket
protected boolean filterPacket(tigase.server.Packet packet, tigase.xmpp.XMPPResourceConnection session) - Specified by:
filterPacketin classAbstractSpamFilter
-