public abstract class DeviceAnnouncementAdapter extends Object implements DeviceAnnouncementListener
An abstract adapter class for receiving device announcements. The methods in this class are empty; it exists as a convenience for creating listener objects.
Extend this class to create a DeviceAnnouncementListener and override only the methods for events that you
care about. If you plan to implement all the methods in the interface, you might as well implement
DeviceAnnouncementListener directly.
Create a listener object using your extended class and then register it using
DeviceFinder.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 the
DeviceAnnouncement is passed to it.
| Constructor and Description |
|---|
DeviceAnnouncementAdapter() |
| Modifier and Type | Method and 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.
|
public void deviceFound(DeviceAnnouncement announcement)
DeviceAnnouncementListenerDevice 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.
deviceFound in interface DeviceAnnouncementListenerannouncement - the message which announced the device's presencepublic void deviceLost(DeviceAnnouncement announcement)
DeviceAnnouncementListenerDevice 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.
deviceLost in interface DeviceAnnouncementListenerannouncement - the last message which was sent by the device before it disappearedCopyright © 2016–2018 Deep Symmetry, LLC. All rights reserved.