org.qtunes.zeroconf
Interface ZeroConf

All Superinterfaces:
Service
All Known Implementing Classes:
JmDNSZeroConf

public interface ZeroConf
extends Service

A unified API which wraps the interface for the Apple "com.apple.dnssd" package or the "javax.jmdns" package, whichever is available. JmDNS prior to version 3 has serious problems, so Apple's interface is used if it's available. Usage:

 ZeroConf zeroconf = ZeroConf.getInstance();
 ZCService service = zeroconf.register("_test._tcp", "MyTestService", 12345, map);
 zeroconf.unregister(service)

 ZCServiceInfo[] list = zeroconf.list("_test._tcp");
 for (int i=0;i


Method Summary
 ZCServiceInfo[] list(java.lang.String type, int ms)
          Search for a maximum of ms ms for services of the specified type.
 ZCService register(java.lang.String type, java.lang.String name, int port, java.util.Map<java.lang.String,java.lang.String> properties)
           
 void unregister(ZCService service)
           
 
Methods inherited from interface org.qtunes.core.Service
getContext, reportState, startService, stopService
 

Method Detail

register

ZCService register(java.lang.String type,
                   java.lang.String name,
                   int port,
                   java.util.Map<java.lang.String,java.lang.String> properties)

unregister

void unregister(ZCService service)

list

ZCServiceInfo[] list(java.lang.String type,
                     int ms)
Search for a maximum of ms ms for services of the specified type. If ms < 0 this method will wait forever