Package tigase.archive.processors
Class MessageArchivePlugin
- java.lang.Object
-
- tigase.xmpp.XMPPProcessor
-
- tigase.xmpp.impl.annotation.AnnotatedXMPPProcessor
-
- tigase.archive.processors.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
-
Constructor Summary
Constructors Constructor Description MessageArchivePlugin()
-
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
-
-
-
-
Field Detail
-
DEFAULT_SAVE
public static final java.lang.String DEFAULT_SAVE
- See Also:
- Constant Field Values
-
MUC_SAVE
public static final java.lang.String MUC_SAVE
- See Also:
- Constant Field Values
-
OWNER_JID
public static final java.lang.String OWNER_JID
- See Also:
- Constant Field Values
-
ARCHIVE
public static final java.lang.String ARCHIVE
- See Also:
- Constant Field Values
-
MSG_ARCHIVE_PATHS
public static final java.lang.String MSG_ARCHIVE_PATHS
- See Also:
- Constant Field Values
-
ID
protected static final java.lang.String ID
- See Also:
- Constant Field Values
-
SETTINGS
protected static final java.lang.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, 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 interfacetigase.xmpp.XMPPProcessorIfc
- Throws:
tigase.xmpp.XMPPException
-
register
public void register(tigase.kernel.core.Kernel kernel)
- Specified by:
register
in interfacetigase.kernel.beans.RegistrarBean
-
unregister
public void unregister(tigase.kernel.core.Kernel kernel)
- Specified by:
unregister
in interfacetigase.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
-
-