public interface DeviceUpdateListenerThe listener interface for receiving detailed updates from all devices. Classes that are interested in knowing when DJ Link devices report detailed status can implement this interface. The listener object created from that class is then registered using
VirtualCdj.addUpdateListener(DeviceUpdateListener). Whenever a device update is received,
received(DeviceUpdate)is invoked with it.
- James Elliott
void received(DeviceUpdate update)
To reduce latency, device updates are delivered to listeners directly on the thread that is receiving them from the network, so if you want to interact with user interface objects in this method, you need to use
javax.swing.SwingUtilities.invokeLater(Runnable)to do so on the Event Dispatch Thread.
Even if you are not interacting with user interface objects, any code in this method must finish quickly, or it will add latency for other listeners, and device updates will back up. If you want to perform lengthy processing of any sort, do so on another thread.
update- the status update which has just arrived