Class SoftwareInfoExtendedDiscoInfoProvider

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

public class SoftwareInfoExtendedDiscoInfoProvider extends Object implements ExtendedDiscoInfoProvider
Provides XEP-0232 Software Information via service discovery.

This provider returns a data form containing information about the server's operating system, software name, and version information. This allows clients to discover what software is running on the server.

The software information is only returned when:

  • The xmpp.iqdiscoinfo.xformsoftwareversion property is enabled (default: true)
  • 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)

See Also:
  • Field Details

    • ENABLED

      public static final SystemProperty<Boolean> ENABLED
      Controls whether XEP-0232 software information is included in disco#info responses.
  • Constructor Details

    • SoftwareInfoExtendedDiscoInfoProvider

      public SoftwareInfoExtendedDiscoInfoProvider()
  • Method Details

    • getExtendedInfos

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

      This implementation only returns software information for service-level disco#info queries targeting the server's main domain (not subdomains like MUC or PubSub). The returned data form contains details about the operating system, OS version, server software name, and version.

      Returns an empty set when:

      • The feature is disabled (ENABLED is false)
      • 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)

      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-0232 data form with software information, or an empty set if conditions are not met
      See Also: