Package tigase.pubsub
Class PepPlugin
- java.lang.Object
-
- tigase.xmpp.XMPPProcessor
-
- tigase.pubsub.PepPlugin
-
- All Implemented Interfaces:
java.lang.Comparable<tigase.xmpp.XMPPImplIfc>
,tigase.xmpp.impl.ServiceDiscovery.AccountServiceProvider
,tigase.xmpp.XMPPImplIfc
,tigase.xmpp.XMPPProcessorConcurrencyAwareIfc
,tigase.xmpp.XMPPProcessorIfc
,tigase.xmpp.XMPPStopListenerIfc
@Bean(name="pep", parent=tigase.server.xmppsession.SessionManager.class, active=true) public class PepPlugin extends tigase.xmpp.XMPPProcessor implements tigase.xmpp.XMPPProcessorIfc, tigase.xmpp.XMPPStopListenerIfc, tigase.xmpp.impl.ServiceDiscovery.AccountServiceProvider
Implements PubSub support for every local user account on it's bare jid using local version of PubSub component.- Author:
- andrzej
-
-
Field Summary
Fields Modifier and Type Field Description protected static tigase.xml.Element[]
DISCO_FEATURES
protected static java.lang.String
DISCO_INFO_XMLNS
protected static java.lang.String
DISCO_ITEMS_XMLNS
protected static java.lang.String[][]
ELEMENTS
protected static java.lang.String
PUBSUB_XMLNS
protected static java.lang.String
PUBSUB_XMLNS_OWNER
protected tigase.xmpp.jid.JID
pubsubJid
protected java.util.Set<java.lang.String>
simpleNodes
protected boolean
simplePepEnabled
protected static java.lang.String[]
XMLNSS
-
Constructor Summary
Constructors Constructor Description PepPlugin()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
concurrentQueuesNo()
protected tigase.xmpp.jid.JID
getPubsubJid(tigase.xmpp.XMPPResourceConnection session, tigase.xmpp.jid.JID serviceJid)
tigase.xmpp.jid.JID
getServiceProviderComponentJid()
java.lang.String
id()
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)
protected void
processIq(tigase.server.Packet packet, tigase.xmpp.XMPPResourceConnection session, java.util.Queue<tigase.server.Packet> results)
protected void
processJabberIqPrivateToPubSubConversion(tigase.server.Packet packet, tigase.xml.Element queryEl, tigase.xmpp.XMPPResourceConnection session, java.util.function.Consumer<tigase.server.Packet> writer)
protected void
processPresence(tigase.server.Packet packet, tigase.xmpp.XMPPResourceConnection session, java.util.Queue<tigase.server.Packet> results)
void
setJabberIqPrivateProcessor(tigase.xmpp.impl.JabberIqPrivate jabberIqPrivateProcessor)
void
setVcardTempProcessor(tigase.xmpp.impl.VCardTemp vcardTempProcessor)
void
stopped(tigase.xmpp.XMPPResourceConnection session, java.util.Queue<tigase.server.Packet> results, java.util.Map<java.lang.String,java.lang.Object> settings)
tigase.xml.Element[]
supDiscoFeatures(tigase.xmpp.XMPPResourceConnection session)
java.lang.String[][]
supElementNamePaths()
java.lang.String[]
supNamespaces()
java.util.Set<tigase.xmpp.StanzaType>
supTypes()
-
Methods inherited from class tigase.xmpp.XMPPProcessor
canHandle, compareTo, getComponentInfo, getInstance, getQueueSize, getStatistics, getThreadsNo, init, supStreamFeatures, toString
-
-
-
-
Field Detail
-
PUBSUB_XMLNS
protected static final java.lang.String PUBSUB_XMLNS
- See Also:
- Constant Field Values
-
PUBSUB_XMLNS_OWNER
protected static final java.lang.String PUBSUB_XMLNS_OWNER
- See Also:
- Constant Field Values
-
DISCO_FEATURES
protected static final tigase.xml.Element[] DISCO_FEATURES
-
DISCO_INFO_XMLNS
protected static final java.lang.String DISCO_INFO_XMLNS
- See Also:
- Constant Field Values
-
DISCO_ITEMS_XMLNS
protected static final java.lang.String DISCO_ITEMS_XMLNS
- See Also:
- Constant Field Values
-
ELEMENTS
protected static final java.lang.String[][] ELEMENTS
-
XMLNSS
protected static final java.lang.String[] XMLNSS
-
simpleNodes
protected final java.util.Set<java.lang.String> simpleNodes
-
pubsubJid
@ConfigField(desc="PubSub Component JID", alias="pubsub-jid") protected tigase.xmpp.jid.JID pubsubJid
-
simplePepEnabled
@ConfigField(desc="Enable simple PEP", alias="simple-pep-enabled") protected boolean simplePepEnabled
-
-
Method Detail
-
id
public java.lang.String id()
- Specified by:
id
in interfacetigase.xmpp.XMPPImplIfc
-
concurrentQueuesNo
public int concurrentQueuesNo()
- Specified by:
concurrentQueuesNo
in interfacetigase.xmpp.XMPPImplIfc
- Overrides:
concurrentQueuesNo
in classtigase.xmpp.XMPPProcessor
-
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
-
setJabberIqPrivateProcessor
public void setJabberIqPrivateProcessor(tigase.xmpp.impl.JabberIqPrivate jabberIqPrivateProcessor)
-
setVcardTempProcessor
public void setVcardTempProcessor(tigase.xmpp.impl.VCardTemp vcardTempProcessor)
-
supDiscoFeatures
public tigase.xml.Element[] supDiscoFeatures(tigase.xmpp.XMPPResourceConnection session)
- Specified by:
supDiscoFeatures
in interfacetigase.xmpp.XMPPImplIfc
- Overrides:
supDiscoFeatures
in classtigase.xmpp.XMPPProcessor
-
supElementNamePaths
public java.lang.String[][] supElementNamePaths()
- Specified by:
supElementNamePaths
in interfacetigase.xmpp.XMPPImplIfc
- Overrides:
supElementNamePaths
in classtigase.xmpp.XMPPProcessor
-
supNamespaces
public java.lang.String[] supNamespaces()
- Specified by:
supNamespaces
in interfacetigase.xmpp.XMPPImplIfc
- Overrides:
supNamespaces
in classtigase.xmpp.XMPPProcessor
-
supTypes
public java.util.Set<tigase.xmpp.StanzaType> supTypes()
- Specified by:
supTypes
in interfacetigase.xmpp.XMPPImplIfc
- Overrides:
supTypes
in classtigase.xmpp.XMPPProcessor
-
stopped
public void stopped(tigase.xmpp.XMPPResourceConnection session, java.util.Queue<tigase.server.Packet> results, java.util.Map<java.lang.String,java.lang.Object> settings)
- Specified by:
stopped
in interfacetigase.xmpp.XMPPStopListenerIfc
-
getServiceProviderComponentJid
public tigase.xmpp.jid.JID getServiceProviderComponentJid()
- Specified by:
getServiceProviderComponentJid
in interfacetigase.xmpp.impl.ServiceDiscovery.AccountServiceProvider
-
getPubsubJid
protected tigase.xmpp.jid.JID getPubsubJid(tigase.xmpp.XMPPResourceConnection session, tigase.xmpp.jid.JID serviceJid)
-
processIq
protected void processIq(tigase.server.Packet packet, tigase.xmpp.XMPPResourceConnection session, java.util.Queue<tigase.server.Packet> results) throws tigase.xmpp.XMPPException
- Throws:
tigase.xmpp.XMPPException
-
processPresence
protected void processPresence(tigase.server.Packet packet, tigase.xmpp.XMPPResourceConnection session, java.util.Queue<tigase.server.Packet> results) throws tigase.xmpp.NotAuthorizedException
- Throws:
tigase.xmpp.NotAuthorizedException
-
processJabberIqPrivateToPubSubConversion
protected void processJabberIqPrivateToPubSubConversion(tigase.server.Packet packet, tigase.xml.Element queryEl, tigase.xmpp.XMPPResourceConnection session, java.util.function.Consumer<tigase.server.Packet> writer) throws tigase.xmpp.PacketErrorTypeException, tigase.xmpp.NotAuthorizedException
- Throws:
tigase.xmpp.PacketErrorTypeException
tigase.xmpp.NotAuthorizedException
-
-