blob: b08263d51358951904b6b45f2dcb6dac95513a2f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
// 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.<br/>
* <b>Note:</b>This event is only the service added event. The service info associated with this event does not include resolution information.<br/>
* To get the full resolved information you need to listen to {@link #serviceResolved(ServiceEvent)} or call {@link JmDNS#getServiceInfo(String, String, long)}
*
* <pre>
* ServiceInfo info = event.getDNS().getServiceInfo(event.getType(), event.getName())
* </pre>
* <p>
* Please note that service resolution may take a few second to resolve.
* </p>
*
* @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.<br/>
* <b>Note:</b>This call back will never be called if the service does not resolve.<br/>
*
* @param event
* The ServiceEvent providing the name, the fully qualified type of the service, and the service info record.
*/
void serviceResolved(ServiceEvent event);
}
|