Package org.deepsymmetry.beatlink
Interface DeviceAnnouncementListener
-
- All Known Implementing Classes:
DeviceAnnouncementAdapter
public interface DeviceAnnouncementListener
The listener interface for receiving device announcements. Classes that are interested in knowing when DJ Link devices are discovered or drop off the network can either implement this interface (and all the methods it contains) or extend the abstractDeviceAnnouncementAdapter
class (overriding only the methods of interest). The listener object created from that class is then registered usingDeviceFinder.addDeviceAnnouncementListener(DeviceAnnouncementListener)
. Whenever a new device is found, or a device disappears from the network, the relevant method in the listener object is invoked, and theDeviceAnnouncement
is passed to it.- Author:
- James Elliott
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
deviceFound(DeviceAnnouncement announcement)
Invoked when a new DJ Link device is heard from on the network.void
deviceLost(DeviceAnnouncement announcement)
Invoked when a DJ Link device is no longer seen on the network.
-
-
-
Method Detail
-
deviceFound
void deviceFound(DeviceAnnouncement announcement)
Invoked when a new DJ Link device is heard from on the network.Device announcements are delivered to listeners on the Event Dispatch thread, so it is fine to interact with user interface objects in this method. Any code in this method must finish quickly, or unhandled events will back up and the user interface will be come unresponsive.
- Parameters:
announcement
- the message which announced the device's presence
-
deviceLost
void deviceLost(DeviceAnnouncement announcement)
Invoked when a DJ Link device is no longer seen on the network.Device announcements are delivered to listeners on the Event Dispatch thread, so it is fine to interact with user interface objects in this method. Any code in this method must finish quickly, or unhandled events will back up and the user interface will be come unresponsive.
- Parameters:
announcement
- the last message which was sent by the device before it disappeared
-
-