Class KnownSpammersFilter

    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected static java.lang.String ID  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void beanConfigurationChanged​(java.util.Collection<java.lang.String> collection)  
      protected boolean filterPacket​(tigase.server.Packet packet, tigase.xmpp.XMPPResourceConnection session)  
      java.lang.String getId()
      Method returns ID of a filter
      double getSpamProbability()
      Method returns probability of detection of a spammer.
      void getStatistics​(java.lang.String name, tigase.stats.StatisticsList list)
      Method should fill the list parameter value with statistics about processed stanzas.
      void identifiedSpam​(tigase.server.Packet packet, tigase.xmpp.XMPPResourceConnection session, SpamFilter filter)  
      void initialize()  
      boolean reportedSpammer​(tigase.xmpp.jid.BareJID jid)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • KnownSpammersFilter

        public KnownSpammersFilter()
    • Method Detail

      • getId

        public java.lang.String getId()
        Description copied from interface: SpamFilter
        Method returns ID of a filter
        Specified by:
        getId in interface SpamFilter
      • 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 by ResultsAwareSpamFilter 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.
        Specified by:
        getSpamProbability in interface SpamFilter
        Returns:
        values between 0 and 1
      • beanConfigurationChanged

        public void beanConfigurationChanged​(java.util.Collection<java.lang.String> collection)
        Specified by:
        beanConfigurationChanged in interface tigase.kernel.beans.config.ConfigurationChangedAware
      • initialize

        public void initialize()
        Specified by:
        initialize in interface tigase.kernel.beans.Initializable
      • getStatistics

        public void getStatistics​(java.lang.String name,
                                  tigase.stats.StatisticsList list)
        Description copied from interface: SpamFilter
        Method should fill the list parameter value with statistics about processed stanzas. Default implementation should be used if there are no meaningful values to return.
        Specified by:
        getStatistics in interface SpamFilter
        Overrides:
        getStatistics in class AbstractSpamFilter
      • filterPacket

        protected boolean filterPacket​(tigase.server.Packet packet,
                                       tigase.xmpp.XMPPResourceConnection session)
        Specified by:
        filterPacket in class AbstractSpamFilter