Interface MDNSDiscoveryParticipant


  • @NonNullByDefault
    public interface MDNSDiscoveryParticipant
    A MDNSDiscoveryParticipant that is registered as a service is picked up by the MDNSDiscoveryService and can thus contribute DiscoveryResults from mDNS scans.
    Author:
    Tobias Bräutigam - Initial contribution
    • Method Detail

      • getSupportedThingTypeUIDs

        Set<ThingTypeUID> getSupportedThingTypeUIDs()
        Defines the list of thing types that this participant can identify
        Returns:
        a set of thing type UIDs for which results can be created
      • getServiceType

        String getServiceType()
        Defines the mDNS service type this participant listens to
        Returns:
        a valid mDNS service type (see: http://www.dns-sd.org/ServiceTypes.html)
      • createResult

        @Nullable DiscoveryResult createResult​(javax.jmdns.ServiceInfo service)
        Creates a discovery result for a mDNS service
        Parameters:
        device - the mDNS service found on the network
        Returns:
        the according discovery result or null, if device is not supported by this participant
      • getThingUID

        @Nullable ThingUID getThingUID​(javax.jmdns.ServiceInfo service)
        Returns the thing UID for a mDNS service
        Parameters:
        device - the mDNS service on the network
        Returns:
        a thing UID or null, if device is not supported by this participant