Package tigase.disco

Interface XMPPService

    • Field Detail

      • INFO_XMLNS

        static final java.lang.String INFO_XMLNS
        A convenience constant with service discovery info xmlns string.
        See Also:
        Constant Field Values
      • ITEMS_XMLNS

        static final java.lang.String ITEMS_XMLNS
        A convenience constant with service discovery items xmlns string.
        See Also:
        Constant Field Values
      • DEF_FEATURES

        static final java.lang.String[] DEF_FEATURES
        A convenience constant with all stream features for service discovery.
      • CMD_FEATURES

        static final java.lang.String[] CMD_FEATURES
        A convenience constant with component features related to ad-hoc commands.
    • Method Detail

      • getDiscoInfo

        Element getDiscoInfo​(java.lang.String node,
                             JID jid,
                             JID from)
        Returns service discovery info for the component. If the jid is null then this is info for the top level request. SM may return disco info on the top level. Other components should not.
        Parameters:
        node - is service discovery node for which the request is made. Is normally null for the component top level request.
        jid - is the jid to which the request has been made.
        from - is the request sender address. Some service discovery information is only meant for administrators.
        Returns:
        returns an XML Element with service discovery data.
      • getDiscoItems

        java.util.List<Element> getDiscoItems​(java.lang.String node,
                                              JID jid,
                                              JID from)
        Returns service discovery items for the component. If the JID is null then this is request for the top level request. SM may return disco items on the top level, other components should just return it's top level service discovery item for null node.
        Parameters:
        node - is a service discovery node for which the request has been made.
        jid - is the jid to which the request has been made.
        from - is the request sender address. Some service discovery information is only meant for administrators.
        Returns:
        a list of service discovery items for this component or the component itself disco item for the top level request.
      • getDiscoFeatures

        java.util.List<Element> getDiscoFeatures​(JID from)
        Returns features for top level disco info
        Parameters:
        from - a request sender address. Some service disco elements are meant to be available only to system administrarors. The component is responsible to check whether the sender is the component administrator and return results appropriate.
        Returns:
        a list of elements with service discovery features.