Class ContactAddressesExtendedDiscoInfoProvider

java.lang.Object
org.jivesoftware.openfire.disco.ContactAddressesExtendedDiscoInfoProvider
All Implemented Interfaces:
ExtendedDiscoInfoProvider

public class ContactAddressesExtendedDiscoInfoProvider extends Object implements ExtendedDiscoInfoProvider
Provides XEP-0157 Contact Addresses for XMPP Services via service discovery.

This provider returns a data form containing administrative contact addresses for the server, including XMPP addresses for administrators and their email addresses when available.

The contact information is only returned when:

  • The admin.disable-exposure property is not set to true
  • The request is for the server domain (name is null or matches the server domain)
  • No specific node is requested (node is null)
  • At least one administrator is configured

See Also:
  • Constructor Details

    • ContactAddressesExtendedDiscoInfoProvider

      public ContactAddressesExtendedDiscoInfoProvider()
  • Method Details

    • getExtendedInfos

      public Set<org.xmpp.forms.DataForm> getExtendedInfos(String domain, String name, String node, org.xmpp.packet.JID senderJID)
      Returns XEP-0157 Contact Addresses data form for the server when appropriate conditions are met.

      This implementation only returns contact information for service-level disco#info queries targeting the server's main domain (not subdomains like MUC or PubSub). The returned data form contains XMPP addresses of configured administrators and their email addresses when available.

      Returns an empty set when:

      • Administrative exposure is disabled (IQDiscoInfoHandler.DISABLE_EXPOSURE is true)
      • A specific disco node is requested (only responds to node-less queries)
      • The domain is not the server's main domain (e.g., MUC or PubSub subdomains)
      • A specific user/resource is targeted (only responds to service-level queries where name is null)
      • No administrators are configured

      Specified by:
      getExtendedInfos in interface ExtendedDiscoInfoProvider
      Parameters:
      domain - the domain of the target JID (e.g., "localhost", "conference.localhost")
      name - the node part of the target JID (null for service-level queries)
      node - the requested disco node parameter (null if not specified)
      senderJID - the JID of the entity that sent the disco#info request
      Returns:
      A set containing a single XEP-0157 data form with contact addresses, or an empty set if conditions are not met
      See Also: