Package tigase.archive.processors
Class MessageArchivePlugin
- java.lang.Object
-
- tigase.xmpp.XMPPProcessor
-
- tigase.xmpp.impl.annotation.AnnotatedXMPPProcessor
-
- tigase.archive.processors.MessageArchivePlugin
-
- All Implemented Interfaces:
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.RegistrarBeanMessageArchingPlugin 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 StringARCHIVEprotected tigase.xmpp.jid.JIDcomponentJidstatic StringDEFAULT_SAVEprotected static StringIDstatic StringMSG_ARCHIVE_PATHSstatic StringMUC_SAVEstatic StringOWNER_JIDprotected static StringSETTINGS
-
Constructor Summary
Constructors Constructor Description MessageArchivePlugin()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String[]getArchivingMatchers()tigase.xmpp.jid.JIDgetComponentJid()StoreMethodgetDefaultStoreMethod(tigase.xmpp.XMPPResourceConnection session)StoreMethodgetRequiredStoreMethod(tigase.xmpp.XMPPResourceConnection session)StoreMucgetRequiredStoreMucMessages(tigase.xmpp.XMPPResourceConnection session)SettingsgetSettings(tigase.xmpp.XMPPResourceConnection session)SettingsloadSettings(tigase.xmpp.XMPPResourceConnection session)voidprocess(tigase.server.Packet packet, tigase.xmpp.XMPPResourceConnection session, tigase.db.NonAuthUserRepository repo, Queue<tigase.server.Packet> results, Map<String,Object> settings)voidregister(tigase.kernel.core.Kernel kernel)voidsetArchivingMatchers(String[] matcherStrs)voidsetComponentJid(tigase.xmpp.jid.JID componentJid)voidunregister(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
-
-
-
-
Field Detail
-
DEFAULT_SAVE
public static final String DEFAULT_SAVE
- See Also:
- Constant Field Values
-
MUC_SAVE
public static final String MUC_SAVE
- See Also:
- Constant Field Values
-
OWNER_JID
public static final String OWNER_JID
- See Also:
- Constant Field Values
-
ARCHIVE
public static final String ARCHIVE
- See Also:
- Constant Field Values
-
MSG_ARCHIVE_PATHS
public static final String MSG_ARCHIVE_PATHS
- See Also:
- Constant Field Values
-
ID
protected static final String ID
- See Also:
- Constant Field Values
-
SETTINGS
protected static final String SETTINGS
- See Also:
- Constant Field Values
-
componentJid
@ConfigField(desc="Message archiving component JID", alias="component-jid") protected tigase.xmpp.jid.JID componentJid
-
-
Method Detail
-
process
public void process(tigase.server.Packet packet, tigase.xmpp.XMPPResourceConnection session, tigase.db.NonAuthUserRepository repo, Queue<tigase.server.Packet> results, Map<String,Object> settings) throws tigase.xmpp.XMPPException- Specified by:
processin interfacetigase.xmpp.XMPPProcessorIfc- Throws:
tigase.xmpp.XMPPException
-
register
public void register(tigase.kernel.core.Kernel kernel)
- Specified by:
registerin interfacetigase.kernel.beans.RegistrarBean
-
unregister
public void unregister(tigase.kernel.core.Kernel kernel)
- Specified by:
unregisterin interfacetigase.kernel.beans.RegistrarBean
-
getArchivingMatchers
public String[] getArchivingMatchers()
-
setArchivingMatchers
public void setArchivingMatchers(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
-
-