Interface ServiceDiscoveryManager

    • Method Detail

      • discoverInformation

        AsyncResult<DiscoverableInfo> discoverInformation​(Jid jid)
        Discovers information about another XMPP entity.

        3. Discovering Information About a Jabber Entity

        A requesting entity may want to discover information about another entity on the network. The information desired generally is of two kinds:

        1. The target entity's identity.
        2. The features offered and protocols supported by the target entity.
        Parameters:
        jid - The entity's JID.
        Returns:
        The async service discovery result.
      • discoverInformation

        AsyncResult<DiscoverableInfo> discoverInformation​(Jid jid,
                                                          String node)
        Discovers information about another XMPP entity targeted at a specific node.

        3.2 Info Nodes

        A disco#info query MAY also be directed to a specific node identifier associated with a JID.

        Parameters:
        jid - The entity's JID.
        node - The node.
        Returns:
        The async service discovery result.
        See Also:
        discoverInformation(Jid)
      • discoverItems

        AsyncResult<ItemNode> discoverItems​(Jid jid)
        Discovers item associated with another XMPP entity.
        Parameters:
        jid - The JID.
        Returns:
        The async result with the discovered items.
      • discoverItems

        AsyncResult<ItemNode> discoverItems​(Jid jid,
                                            ResultSetManagement resultSet)
        Discovers item associated with another XMPP entity.
        Parameters:
        jid - The JID.
        resultSet - The result set management.
        Returns:
        The async result with the discovered items.
      • discoverItems

        AsyncResult<ItemNode> discoverItems​(Jid jid,
                                            String node)
        Discovers item associated with another XMPP entity.
        Parameters:
        jid - The JID.
        node - The node.
        Returns:
        The async result with the discovered items.
      • discoverItems

        AsyncResult<ItemNode> discoverItems​(Jid jid,
                                            String node,
                                            ResultSetManagement resultSetManagement)
        Discovers item associated with another XMPP entity.
        Parameters:
        jid - The JID.
        node - The node.
        resultSetManagement - The result set management.
        Returns:
        The async result with the discovered items.
      • discoverServices

        AsyncResult<List<Item>> discoverServices​(Jid jid,
                                                 Identity identity)
        Discovers a service on the given entity by its identity.

        E.g. to discover MUC services you could call this method with Identity.conferenceText();

        This method is generally preferred over discoverServices(Jid, String).

        Parameters:
        identity - The identity.
        jid - The XMPP entity, usually a server.
        Returns:
        The services, that belong to the namespace.
      • discoverServices

        AsyncResult<List<Item>> discoverServices​(Jid jid,
                                                 String feature)
        Discovers a service on the given entity by its feature namespace.
        Parameters:
        feature - The feature namespace.
        jid - The XMPP entity, usually a server.
        Returns:
        The async result with the services, that belong to the namespace.
      • addFeature

        void addFeature​(String feature)
        Adds a feature. Features should not be added or removed directly. Instead enable or disable the respective extension manager, which will then add or remove the feature. That way, supported features are consistent with enabled extension managers and service discovery won't reveal features, that are in fact not supported.
        Parameters:
        feature - The feature.
        See Also:
        removeFeature(String)
      • removeFeature

        void removeFeature​(String feature)
        Removes a feature.
        Parameters:
        feature - The feature.
        See Also:
        addFeature(String)
      • addInfoProvider

        boolean addInfoProvider​(InfoProvider infoProvider)
        Adds an info provider.
        Parameters:
        infoProvider - The info provider.
        Returns:
        true, if it has been successfully added.
        See Also:
        removeInfoProvider(InfoProvider)
      • removeInfoProvider

        boolean removeInfoProvider​(InfoProvider infoProvider)
        Removes an info provider.
        Parameters:
        infoProvider - The info provider.
        Returns:
        true, if it has been successfully remove.
        See Also:
        addInfoProvider(InfoProvider)
      • getDefaultInfo

        DiscoverableInfo getDefaultInfo()
        Gets the root node.
        Returns:
        The root node.
      • addItemProvider

        boolean addItemProvider​(ItemProvider itemProvider)
        Adds an item provider. Requests to this handler will return items returned by the provider if appropriate.
        Parameters:
        itemProvider - The item provider.
        Returns:
        If the provider could be added.
        See Also:
        removeItemProvider(ItemProvider)
      • removeItemProvider

        boolean removeItemProvider​(ItemProvider itemProvider)
        Removes an item provider.
        Parameters:
        itemProvider - The item provider.
        Returns:
        If the provider could be removed .
        See Also:
        addItemProvider(ItemProvider)