Interface MDNSClient


  • public interface MDNSClient
    This interface defines how to get an JmDNS instance to access Bonjour/MDNS
    Author:
    Tobias Br´┐Żutigam - Initial contribution
    • Method Detail

      • getClientInstances

        Set<javax.jmdns.JmDNS> getClientInstances()
        This method returns the set of JmDNS instances
        Returns:
        a set of JmDNS instances
      • addServiceListener

        void addServiceListener​(String type,
                                javax.jmdns.ServiceListener listener)
        Listen for services of a given type
        Parameters:
        type - full qualified service type
        listener - listener for service updates
      • removeServiceListener

        void removeServiceListener​(String type,
                                   javax.jmdns.ServiceListener listener)
        Remove listener for services of a given type
        Parameters:
        type - full qualified service type
        listener - listener for service updates
      • registerService

        void registerService​(ServiceDescription description)
                      throws IOException
        Register a service
        Parameters:
        description - service to register, described by (@link ServiceDescription)
        Throws:
        IOException
      • unregisterService

        void unregisterService​(ServiceDescription description)
        Unregister a service. The service should have been registered.
        Parameters:
        description - service to remove, described by (@link ServiceDescription)
      • unregisterAllServices

        void unregisterAllServices()
        Unregister all services
      • list

        javax.jmdns.ServiceInfo[] list​(String type)
        Returns a list of service infos of the specified type
        Parameters:
        type - service type name
        Returns:
        an array of service instances
      • list

        javax.jmdns.ServiceInfo[] list​(String type,
                                       Duration timeout)
        Returns a list of service infos of the specified type within timeout
        Parameters:
        type - service type name
        timeout - the amount of time it should wait if no service info is found.
        Returns:
        an array of service instances
      • close

        void close()
        Close properly JmDNS instances