Package jmri.util.zeroconf
Class ZeroConfClient
java.lang.Object
jmri.util.zeroconf.ZeroConfClient
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionString[]getHostList(String service) javax.jmdns.ServiceInfogetService(String service) Request the first service of a particular service.javax.jmdns.ServiceInfogetServicebyAdName(String service, String adName) Request the first service of a particular service with a particular service name.javax.jmdns.ServiceInfogetServiceOnHost(String service, String hostname) Request the first service of a particular service on a specified host.List<javax.jmdns.ServiceInfo>getServices(String service) Get all servers providing the specified service.longGet current timeoutvoidsetTimeout(long timeout) Set timeoutvoidstartServiceListener(String service) voidstopServiceListener(String service)
-
Constructor Details
-
ZeroConfClient
public ZeroConfClient()
-
-
Method Details
-
startServiceListener
-
stopServiceListener
-
getService
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
Get all servers providing the specified service.- Parameters:
service- the name of service as generated usingZeroConfServiceManager.key(java.lang.String, java.lang.String)- Returns:
- A list of servers or an empty list.
-
getServiceOnHost
Request the first service of a particular service on a specified host.- Parameters:
service- string service servicehostname- string host name- Returns:
- JmDNS service entry for the first service of a particular service on the specified host..
-
getServicebyAdName
Request the first service of a particular service with a particular service name.- Parameters:
service- string service serviceadName- string qualified service advertisement name- Returns:
- JmDNS service entry for the first service of a particular service on the specified host..
-
getHostList
-
getTimeout
Get current timeout- Returns:
- timeout as long in milliseconds
-
setTimeout
Set timeout- Parameters:
timeout- in milliseconds
-