Package tigase.pubsub

Class PepPlugin

  • All Implemented Interfaces:
    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 Detail

      • DISCO_FEATURES

        protected static final tigase.xml.Element[] DISCO_FEATURES
      • ELEMENTS

        protected static final String[][] ELEMENTS
      • XMLNSS

        protected static final String[] XMLNSS
      • simpleNodes

        protected final Set<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
    • Constructor Detail

      • PepPlugin

        public PepPlugin()
    • Method Detail

      • id

        public String id()
        Specified by:
        id in interface tigase.xmpp.XMPPImplIfc
      • concurrentQueuesNo

        public int concurrentQueuesNo()
        Specified by:
        concurrentQueuesNo in interface tigase.xmpp.XMPPImplIfc
      • 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:
        process in interface tigase.xmpp.XMPPProcessorIfc
        Throws:
        tigase.xmpp.XMPPException
      • supDiscoFeatures

        public tigase.xml.Element[] supDiscoFeatures​(tigase.xmpp.XMPPResourceConnection session)
        Specified by:
        supDiscoFeatures in interface tigase.xmpp.XMPPImplIfc
        Overrides:
        supDiscoFeatures in class tigase.xmpp.XMPPProcessor
      • supElementNamePaths

        public String[][] supElementNamePaths()
        Specified by:
        supElementNamePaths in interface tigase.xmpp.XMPPImplIfc
        Overrides:
        supElementNamePaths in class tigase.xmpp.XMPPProcessor
      • supNamespaces

        public String[] supNamespaces()
        Specified by:
        supNamespaces in interface tigase.xmpp.XMPPImplIfc
        Overrides:
        supNamespaces in class tigase.xmpp.XMPPProcessor
      • supTypes

        public Set<tigase.xmpp.StanzaType> supTypes()
        Specified by:
        supTypes in interface tigase.xmpp.XMPPImplIfc
        Overrides:
        supTypes in class tigase.xmpp.XMPPProcessor
      • stopped

        public void stopped​(tigase.xmpp.XMPPResourceConnection session,
                            Queue<tigase.server.Packet> results,
                            Map<String,​Object> settings)
        Specified by:
        stopped in interface tigase.xmpp.XMPPStopListenerIfc
      • getServiceProviderComponentJid

        public tigase.xmpp.jid.JID getServiceProviderComponentJid()
        Specified by:
        getServiceProviderComponentJid in interface tigase.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,
                                 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,
                                       Queue<tigase.server.Packet> results)
                                throws tigase.xmpp.NotAuthorizedException
        Throws:
        tigase.xmpp.NotAuthorizedException