Interface DeviceUpdateListener

  • public interface DeviceUpdateListener
    The 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
    • Method Detail

      • received

        void received​(DeviceUpdate update)

        Invoked whenever a device status update is received by VirtualCdj. Currently the update will either be a MixerStatus or a CdjStatus, but more varieties may be added as the protocol analysis deepens.

        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