Package tigase.spam.filters
Class PresenceSubscribeOutgoingFilter
- java.lang.Object
-
- tigase.spam.filters.AbstractSpamFilter
-
- tigase.spam.filters.PresenceSubscribeOutgoingFilter
-
- All Implemented Interfaces:
SpamFilter
@Bean(name="presence-subscribe-outgoing", parent=SpamProcessor.class, active=false) public class PresenceSubscribeOutgoingFilter extends AbstractSpamFilter
This class just filters outgoing presence-subscribe requests. For better SPAM filtering please use PresenceSubscribeFilter.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
PresenceSubscribeOutgoingFilter.Counter
-
Field Summary
Fields Modifier and Type Field Description protected static java.lang.String
ID
-
Constructor Summary
Constructors Constructor Description PresenceSubscribeOutgoingFilter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
filterPacket(tigase.server.Packet packet, tigase.xmpp.XMPPResourceConnection session)
java.lang.String
getId()
Method returns ID of a filterdouble
getSpamProbability()
Method returns probability of detection of a spammer.-
Methods inherited from class tigase.spam.filters.AbstractSpamFilter
filter, getStatistics, toString
-
-
-
-
Field Detail
-
ID
protected static final java.lang.String ID
- See Also:
- Constant Field Values
-
-
Method Detail
-
getId
public java.lang.String getId()
Description copied from interface:SpamFilter
Method returns ID of a filter
-
getSpamProbability
public double getSpamProbability()
Description copied from interface:SpamFilter
Method 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 byResultsAwareSpamFilter
implementation 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
-
filterPacket
protected boolean filterPacket(tigase.server.Packet packet, tigase.xmpp.XMPPResourceConnection session)
- Specified by:
filterPacket
in classAbstractSpamFilter
-
-