Class ZeroConfClient

java.lang.Object
jmri.util.zeroconf.ZeroConfClient

public class ZeroConfClient extends Object
  • Constructor Details

  • Method Details

    • startServiceListener

      public void startServiceListener(@Nonnull String service)
    • stopServiceListener

      public void stopServiceListener(@Nonnull String service)
    • getService

      public javax.jmdns.ServiceInfo getService(@Nonnull String service)
      Request the first service of a particular service.
      Parameters:
      service - string service getName
      Returns:
      JmDNS service entry for the first service of a particular service.
    • getServices

      @Nonnull public List<javax.jmdns.ServiceInfo> getServices(@Nonnull String service)
      Get all servers providing the specified service.
      Parameters:
      service - the name of service as generated using ZeroConfServiceManager.key(java.lang.String, java.lang.String)
      Returns:
      A list of servers or an empty list.
    • getServiceOnHost

      public javax.jmdns.ServiceInfo getServiceOnHost(@Nonnull String service, @Nonnull String hostname)
      Request the first service of a particular service on a specified host.
      Parameters:
      service - string service service
      hostname - string host name
      Returns:
      JmDNS service entry for the first service of a particular service on the specified host..
    • getServicebyAdName

      public javax.jmdns.ServiceInfo getServicebyAdName(@Nonnull String service, @Nonnull String adName)
      Request the first service of a particular service with a particular service name.
      Parameters:
      service - string service service
      adName - string qualified service advertisement name
      Returns:
      JmDNS service entry for the first service of a particular service on the specified host..
    • getHostList

    • getTimeout

      public long getTimeout()
      Get current timeout
      Returns:
      timeout as long in milliseconds
    • setTimeout

      public void setTimeout(long timeout)
      Set timeout
      Parameters:
      timeout - in milliseconds