Class MessageArchivePlugin

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

    @Bean(name="message-archive",
          parents={Xep0136MessageArchivingProcessor.class,Xep0313MessageArchiveManagementProcessor.class},
          active=true)
    public class MessageArchivePlugin
    extends tigase.xmpp.impl.annotation.AnnotatedXMPPProcessor
    implements tigase.xmpp.XMPPProcessorIfc, tigase.kernel.beans.RegistrarBean
    MessageArchingPlugin is implementation of plugin which forwards messages with type set to "chat" to MessageArchivingComponent to store this messages in message archive.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String ARCHIVE  
      protected tigase.xmpp.jid.JID componentJid  
      static java.lang.String DEFAULT_SAVE  
      protected static java.lang.String ID  
      static java.lang.String MSG_ARCHIVE_PATHS  
      static java.lang.String MUC_SAVE  
      static java.lang.String OWNER_JID  
      protected static java.lang.String SETTINGS  
      • Fields inherited from class tigase.xmpp.XMPPProcessor

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

        CLIENT_XMLNS
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String[] getArchivingMatchers()  
      tigase.xmpp.jid.JID getComponentJid()  
      StoreMethod getDefaultStoreMethod​(tigase.xmpp.XMPPResourceConnection session)  
      StoreMethod getRequiredStoreMethod​(tigase.xmpp.XMPPResourceConnection session)  
      StoreMuc getRequiredStoreMucMessages​(tigase.xmpp.XMPPResourceConnection session)  
      Settings getSettings​(tigase.xmpp.XMPPResourceConnection session)  
      Settings loadSettings​(tigase.xmpp.XMPPResourceConnection session)  
      void process​(tigase.server.Packet packet, tigase.xmpp.XMPPResourceConnection session, tigase.db.NonAuthUserRepository repo, java.util.Queue<tigase.server.Packet> results, java.util.Map<java.lang.String,​java.lang.Object> settings)  
      void register​(tigase.kernel.core.Kernel kernel)  
      void setArchivingMatchers​(java.lang.String[] matcherStrs)  
      void setComponentJid​(tigase.xmpp.jid.JID componentJid)  
      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, getStatistics, 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, getStatistics, id, init, supDiscoFeatures, supElementNamePaths, supNamespaces, supStreamFeatures, supTypes
    • Field Detail

      • MSG_ARCHIVE_PATHS

        public static final java.lang.String MSG_ARCHIVE_PATHS
        See Also:
        Constant Field Values
      • componentJid

        @ConfigField(desc="Message archiving component JID",
                     alias="component-jid")
        protected tigase.xmpp.jid.JID componentJid
    • Constructor Detail

      • MessageArchivePlugin

        public MessageArchivePlugin()
    • Method Detail

      • process

        public void process​(tigase.server.Packet packet,
                            tigase.xmpp.XMPPResourceConnection session,
                            tigase.db.NonAuthUserRepository repo,
                            java.util.Queue<tigase.server.Packet> results,
                            java.util.Map<java.lang.String,​java.lang.Object> settings)
                     throws tigase.xmpp.XMPPException
        Specified by:
        process in interface tigase.xmpp.XMPPProcessorIfc
        Throws:
        tigase.xmpp.XMPPException
      • 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
      • getArchivingMatchers

        public java.lang.String[] getArchivingMatchers()
      • setArchivingMatchers

        public void setArchivingMatchers​(java.lang.String[] matcherStrs)
      • getComponentJid

        public tigase.xmpp.jid.JID getComponentJid()
      • setComponentJid

        public void setComponentJid​(tigase.xmpp.jid.JID componentJid)
      • getDefaultStoreMethod

        public StoreMethod getDefaultStoreMethod​(tigase.xmpp.XMPPResourceConnection session)
      • getRequiredStoreMethod

        public StoreMethod getRequiredStoreMethod​(tigase.xmpp.XMPPResourceConnection session)
      • getSettings

        public Settings getSettings​(tigase.xmpp.XMPPResourceConnection session)
                             throws tigase.xmpp.NotAuthorizedException
        Throws:
        tigase.xmpp.NotAuthorizedException
      • getRequiredStoreMucMessages

        public StoreMuc getRequiredStoreMucMessages​(tigase.xmpp.XMPPResourceConnection session)
      • loadSettings

        public Settings loadSettings​(tigase.xmpp.XMPPResourceConnection session)
                              throws tigase.xmpp.NotAuthorizedException
        Throws:
        tigase.xmpp.NotAuthorizedException