Interface for a user listener. More...
Public Member Functions | |
void | serviceAdded (DiscoveredService service) |
void | serviceRemoved (DiscoveredService service) |
void | serviceResolved (DiscoveredService service) |
Interface for a user listener.
Subclass this to create your own listener callbacks and then pass to the zeroconf class when you call the addListener command.
This needs a bit of work on the user's end - jmdns often provides alot of callbacks especially if you are listening on multiple interfaces. You'll need a bit of processing at the serviceResolved callback in particular.
Keep in mind that service info's come often come in with multiple addresses, or even addresses that have already been resolved on previous callbacks. So when processing resolved services, check the name, port and hostname haven't already been added to your stored entries and if they have, simply append whatever new addresses you find to the existing entry.
Definition at line 22 of file ZeroconfDiscoveryHandler.java.
void ros.zeroconf.jmdns.ZeroconfDiscoveryHandler.serviceAdded | ( | DiscoveredService | service | ) |
void ros.zeroconf.jmdns.ZeroconfDiscoveryHandler.serviceRemoved | ( | DiscoveredService | service | ) |
void ros.zeroconf.jmdns.ZeroconfDiscoveryHandler.serviceResolved | ( | DiscoveredService | service | ) |