Class DiscoveryModule

  • All Implemented Interfaces:
    tigase.component.modules.Module

    @Bean(name="disco",
          parent=PubSubComponent.class,
          active=true)
    public class DiscoveryModule
    extends tigase.component.modules.impl.DiscoveryModule
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String PUBSUB_FEATURE_METADATA  
      • Fields inherited from class tigase.component.modules.impl.DiscoveryModule

        component, DISCO_INFO_XMLNS, DISCO_ITEMS_XMLNS, ID
      • Fields inherited from class tigase.component.modules.AbstractModule

        eventBus, log, writer
      • Fields inherited from interface tigase.component.modules.Module

        EMPTY_FEATURES
    • Constructor Summary

      Constructors 
      Constructor Description
      DiscoveryModule()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean canHandle​(tigase.server.Packet packet)  
      java.lang.String[] getFeatures()  
      protected IPubSubRepository getRepository()  
      protected java.lang.String[] prefilterNodesWithRSM​(java.lang.String[] nodes, tigase.xmpp.rsm.RSM rsm)  
      protected tigase.server.Packet prepareDiscoInfoResponse​(tigase.server.Packet packet, tigase.xmpp.jid.JID jid, java.lang.String node, tigase.xmpp.jid.JID senderJID)  
      protected java.util.List<tigase.xml.Element> prepareDiscoItems​(tigase.xmpp.jid.JID toJid, java.lang.String nodeName, tigase.xmpp.jid.JID senderJid, tigase.xmpp.rsm.RSM rsm)  
      protected void processDiscoInfo​(tigase.server.Packet packet, tigase.xmpp.jid.JID jid, java.lang.String node, tigase.xmpp.jid.JID senderJID)  
      • Methods inherited from class tigase.component.modules.impl.DiscoveryModule

        getAdHocCommandModule, getAvailableFeatures, getAvailableFeatures, getModuleCriteria, getModules, prepareDiscoInfoReponse, process, processAdHocCommandItems, processDiscoItems, setAdHocCommandModule, setModules
      • Methods inherited from class tigase.component.modules.AbstractModule

        fireEvent, getEventBus, getWriter, setEventBus, setWriter, write, write
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • PUBSUB_FEATURE_METADATA

        public static final java.lang.String PUBSUB_FEATURE_METADATA
        See Also:
        Constant Field Values
    • Constructor Detail

      • DiscoveryModule

        public DiscoveryModule()
    • Method Detail

      • getFeatures

        public java.lang.String[] getFeatures()
        Specified by:
        getFeatures in interface tigase.component.modules.Module
        Overrides:
        getFeatures in class tigase.component.modules.impl.DiscoveryModule
      • canHandle

        public boolean canHandle​(tigase.server.Packet packet)
      • processDiscoInfo

        protected void processDiscoInfo​(tigase.server.Packet packet,
                                        tigase.xmpp.jid.JID jid,
                                        java.lang.String node,
                                        tigase.xmpp.jid.JID senderJID)
                                 throws tigase.component.exceptions.ComponentException,
                                        tigase.component.exceptions.RepositoryException
        Overrides:
        processDiscoInfo in class tigase.component.modules.impl.DiscoveryModule
        Throws:
        tigase.component.exceptions.ComponentException
        tigase.component.exceptions.RepositoryException
      • prepareDiscoItems

        protected java.util.List<tigase.xml.Element> prepareDiscoItems​(tigase.xmpp.jid.JID toJid,
                                                                       java.lang.String nodeName,
                                                                       tigase.xmpp.jid.JID senderJid,
                                                                       tigase.xmpp.rsm.RSM rsm)
                                                                throws tigase.component.exceptions.ComponentException,
                                                                       tigase.component.exceptions.RepositoryException
        Overrides:
        prepareDiscoItems in class tigase.component.modules.impl.DiscoveryModule
        Throws:
        tigase.component.exceptions.ComponentException
        tigase.component.exceptions.RepositoryException
      • prefilterNodesWithRSM

        protected java.lang.String[] prefilterNodesWithRSM​(java.lang.String[] nodes,
                                                           tigase.xmpp.rsm.RSM rsm)
                                                    throws PubSubException
        Throws:
        PubSubException
      • prepareDiscoInfoResponse

        protected tigase.server.Packet prepareDiscoInfoResponse​(tigase.server.Packet packet,
                                                                tigase.xmpp.jid.JID jid,
                                                                java.lang.String node,
                                                                tigase.xmpp.jid.JID senderJID)
        Overrides:
        prepareDiscoInfoResponse in class tigase.component.modules.impl.DiscoveryModule