Class SpamProcessor

java.lang.Object
tigase.xmpp.XMPPProcessor
tigase.xmpp.impl.annotation.AnnotatedXMPPProcessor
tigase.spam.SpamProcessor
All Implemented Interfaces:
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 final String
     

    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
     
  • Method Summary

    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, Queue<tigase.server.Packet> queue, Map<String,Object> map)
     
    void
    register(tigase.kernel.core.Kernel kernel)
     
    void
     
    void
     
    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 Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface Comparable

    compareTo

    Methods inherited from interface tigase.xmpp.XMPPImplIfc

    canHandle, concurrentQueuesNo, getComponentInfo, id, init, supDiscoFeatures, supElementNamePaths, supNamespaces, supStreamFeatures, supTypes
  • Field Details

  • Constructor Details

    • SpamProcessor

      public SpamProcessor()
  • Method Details

    • preProcess

      public boolean preProcess(tigase.server.Packet packet, tigase.xmpp.XMPPResourceConnection session, tigase.db.NonAuthUserRepository nonAuthUserRepository, Queue<tigase.server.Packet> queue, Map<String,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
    • getSpammers

      public Collection<KnownSpammersFilter.Spammer> getSpammers()
    • setFilters

      public void setFilters(CopyOnWriteArrayList<SpamFilter> filters)
    • setResultsAwareFilters

      public void setResultsAwareFilters(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