Package javax.jmdns.impl
Class ListenerStatus.ServiceListenerStatus
java.lang.Object
javax.jmdns.impl.ListenerStatus<ServiceListener>
javax.jmdns.impl.ListenerStatus.ServiceListenerStatus
- Enclosing class:
ListenerStatus<T extends EventListener>
-
Nested Class Summary
Nested classes/interfaces inherited from class javax.jmdns.impl.ListenerStatus
ListenerStatus.ServiceListenerStatus, ListenerStatus.ServiceTypeListenerStatus
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ConcurrentMap
<String, ServiceInfo> private static org.slf4j.Logger
Fields inherited from class javax.jmdns.impl.ListenerStatus
ASYNCHRONOUS, SYNCHRONOUS
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static final boolean
_sameInfo
(ServiceInfo info, ServiceInfo lastInfo) (package private) void
serviceAdded
(ServiceEvent event) A service has been added.
Note:This event is only the service added event.(package private) void
serviceRemoved
(ServiceEvent event) A service has been removed.(package private) void
serviceResolved
(ServiceEvent event) A service has been resolved.toString()
Methods inherited from class javax.jmdns.impl.ListenerStatus
equals, getListener, hashCode, isSynchronous
-
Field Details
-
logger
private static org.slf4j.Logger logger -
_addedServices
-
-
Constructor Details
-
ServiceListenerStatus
- Parameters:
listener
- listener being tracked.synch
- true if that listener can be called asynchronously
-
-
Method Details
-
serviceAdded
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 toserviceResolved(ServiceEvent)
or callJmDNS.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.
- Parameters:
event
- The ServiceEvent providing the name and fully qualified type of the service.
-
serviceRemoved
A service has been removed.- Parameters:
event
- The ServiceEvent providing the name and fully qualified type of the service.
-
serviceResolved
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.- Parameters:
event
- The ServiceEvent providing the name, the fully qualified type of the service, and the service info record.
-
_sameInfo
-
toString
- Overrides:
toString
in classListenerStatus<ServiceListener>
-