Package tigase.spam

Class SpamProcessor

  • All Implemented Interfaces:
    java.lang.Comparable<tigase.xmpp.XMPPImplIfc>, tigase.kernel.beans.RegistrarBean, tigase.xmpp.SpamReportsConsumer, tigase.xmpp.XMPPImplIfc, tigase.xmpp.XMPPPreprocessorIfc, tigase.xmpp.XMPPProcessorConcurrencyAwareIfc

    @Bean(name="spam-filter",
          parent=tigase.server.xmppsession.SessionManager.class,
          active=true)
    public class SpamProcessor
    extends tigase.xmpp.impl.annotation.AnnotatedXMPPProcessor
    implements tigase.xmpp.XMPPPreprocessorIfc, tigase.kernel.beans.RegistrarBean, tigase.xmpp.SpamReportsConsumer
    Created by andrzej on 08.04.2017.
    • Nested Class Summary

      • Nested classes/interfaces inherited from interface tigase.xmpp.SpamReportsConsumer

        tigase.xmpp.SpamReportsConsumer.ReportType
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String ID  
      • Fields inherited from class tigase.xmpp.XMPPProcessor

        ALL_NAMES, ALL_PATHS, cmpInfo
      • Fields inherited from interface tigase.xmpp.SpamReportsConsumer

        FEATURES, XMLNS, XMLNS_PREFIX
      • Fields inherited from interface tigase.xmpp.XMPPImplIfc

        CLIENT_XMLNS
    • Constructor Summary

      Constructors 
      Constructor Description
      SpamProcessor()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void getStatistics​(tigase.stats.StatisticsList list)  
      boolean preProcess​(tigase.server.Packet packet, tigase.xmpp.XMPPResourceConnection session, tigase.db.NonAuthUserRepository nonAuthUserRepository, java.util.Queue<tigase.server.Packet> queue, java.util.Map<java.lang.String,​java.lang.Object> map)  
      void register​(tigase.kernel.core.Kernel kernel)  
      void setFilters​(java.util.concurrent.CopyOnWriteArrayList<SpamFilter> filters)  
      void setResultsAwareFilters​(java.util.concurrent.CopyOnWriteArrayList<ResultsAwareSpamFilter> resultsAwareFilters)  
      boolean spamReportedFrom​(tigase.xmpp.jid.BareJID jid, tigase.xmpp.SpamReportsConsumer.ReportType type)  
      void unregister​(tigase.kernel.core.Kernel kernel)  
      • Methods inherited from class tigase.xmpp.impl.annotation.AnnotatedXMPPProcessor

        id, supDiscoFeatures, supElementNamePaths, supNamespaces, supStreamFeatures, supTypes
      • Methods inherited from class tigase.xmpp.XMPPProcessor

        canHandle, compareTo, concurrentQueuesNo, getComponentInfo, getInstance, getQueueSize, getThreadsNo, init, toString
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface java.lang.Comparable

        compareTo
      • Methods inherited from interface tigase.xmpp.XMPPImplIfc

        canHandle, concurrentQueuesNo, getComponentInfo, id, init, supDiscoFeatures, supElementNamePaths, supNamespaces, supStreamFeatures, supTypes
    • Constructor Detail

      • SpamProcessor

        public SpamProcessor()
    • Method Detail

      • preProcess

        public boolean preProcess​(tigase.server.Packet packet,
                                  tigase.xmpp.XMPPResourceConnection session,
                                  tigase.db.NonAuthUserRepository nonAuthUserRepository,
                                  java.util.Queue<tigase.server.Packet> queue,
                                  java.util.Map<java.lang.String,​java.lang.Object> map)
        Specified by:
        preProcess in interface tigase.xmpp.XMPPPreprocessorIfc
      • register

        public void register​(tigase.kernel.core.Kernel kernel)
        Specified by:
        register in interface tigase.kernel.beans.RegistrarBean
      • unregister

        public void unregister​(tigase.kernel.core.Kernel kernel)
        Specified by:
        unregister in interface tigase.kernel.beans.RegistrarBean
      • getStatistics

        public void getStatistics​(tigase.stats.StatisticsList list)
        Specified by:
        getStatistics in interface tigase.xmpp.XMPPImplIfc
        Overrides:
        getStatistics in class tigase.xmpp.XMPPProcessor
      • setFilters

        public void setFilters​(java.util.concurrent.CopyOnWriteArrayList<SpamFilter> filters)
      • setResultsAwareFilters

        public void setResultsAwareFilters​(java.util.concurrent.CopyOnWriteArrayList<ResultsAwareSpamFilter> resultsAwareFilters)
      • spamReportedFrom

        public boolean spamReportedFrom​(tigase.xmpp.jid.BareJID jid,
                                        tigase.xmpp.SpamReportsConsumer.ReportType type)
        Specified by:
        spamReportedFrom in interface tigase.xmpp.SpamReportsConsumer