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 Summary
Modifier and TypeMethodDescriptionvoid
addServiceListener
(String type, javax.jmdns.ServiceListener listener) Listen for services of a given typevoid
close()
Close properly JmDNS instancesSet
<javax.jmdns.JmDNS> This method returns the set of JmDNS instancesjavax.jmdns.ServiceInfo[]
Returns a list of service infos of the specified typejavax.jmdns.ServiceInfo[]
Returns a list of service infos of the specified type within timeoutvoid
registerService
(ServiceDescription description) Register a servicevoid
removeServiceListener
(String type, javax.jmdns.ServiceListener listener) Remove listener for services of a given typevoid
Unregister all servicesvoid
unregisterService
(ServiceDescription description) Unregister a service.
-
Method Details
-
getClientInstances
Set<javax.jmdns.JmDNS> getClientInstances()This method returns the set of JmDNS instances- Returns:
- a set of JmDNS instances
-
addServiceListener
Listen for services of a given type- Parameters:
type
- full qualified service typelistener
- listener for service updates
-
removeServiceListener
Remove listener for services of a given type- Parameters:
type
- full qualified service typelistener
- listener for service updates
-
registerService
Register a service- Parameters:
description
- service to register, described by (@link ServiceDescription)- Throws:
IOException
-
unregisterService
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
Returns a list of service infos of the specified type- Parameters:
type
- service type name- Returns:
- an array of service instances
-
list
Returns a list of service infos of the specified type within timeout- Parameters:
type
- service type nametimeout
- 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
-