javax.jmdns.ServiceListener Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jmdns Show documentation
Show all versions of jmdns Show documentation
JmDNS is a Java implementation of multi-cast DNS and can be used for service registration and discovery in local area networks. JmDNS is fully compatible with Apple's Bonjour.
The project was originally started in December 2002 by Arthur van Hoff at Strangeberry. In November 2003 the project was moved to SourceForge, and the name was changed from JRendezvous to JmDNS for legal reasons.
Many thanks to Stuart Cheshire for help and moral support.
The newest version!
// Copyright 2003-2005 Arthur van Hoff, Rick Blair
// Licensed under Apache License version 2.0
// Original license LGPL
package javax.jmdns;
import java.util.EventListener;
/**
* Listener for service updates.
*
* @author Arthur van Hoff, Werner Randelshofer, Pierre Frisch
*/
public interface ServiceListener extends EventListener {
/**
* A service has been added.
* Note:This event is only the service added event. The service info associated with this event does not include resolution information.
* To get the full resolved information you need to listen to {@link #serviceResolved(ServiceEvent)} or call {@link JmDNS#getServiceInfo(String, String, long)}
*
*
* ServiceInfo info = event.getDNS().getServiceInfo(event.getType(), event.getName())
*
*
* Please note that service resolution may take a few second to resolve.
*
*
* @param event
* The ServiceEvent providing the name and fully qualified type of the service.
*/
void serviceAdded(ServiceEvent event);
/**
* A service has been removed.
*
* @param event
* The ServiceEvent providing the name and fully qualified type of the service.
*/
void serviceRemoved(ServiceEvent event);
/**
* A service has been resolved. Its details are now available in the ServiceInfo record.
* Note:This call back will never be called if the service does not resolve.
*
* @param event
* The ServiceEvent providing the name, the fully qualified type of the service, and the service info record.
*/
void serviceResolved(ServiceEvent event);
}