Interface PrecisePositionListener


  • public interface PrecisePositionListener
    The listener interface for receiving precise position announcements. Classes that are interested in knowing when DJ Link devices (at the time of writing, only CDJ-3000s) report their precise position can implement this interface. The listener object created from that class is then registered using BeatFinder.addPrecisePositionListener(PrecisePositionListener). Whenever a position report beat arrives, the positionReported(PrecisePosition) method in the listener object is invoked with it.
    Author:
    James Elliott
    • Method Detail

      • positionReported

        void positionReported​(PrecisePosition position)

        Invoked when a precise player position is reported on the network.

        To reduce latency, precise position announcements are delivered to listeners directly on the thread that is receiving them 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 precise position announcements (which arrive very frequently, at roughly 30 millisecond intervals from players that send them) will back up. If you want to perform lengthy processing of any sort, do so on another thread.

        Parameters:
        position - the message containing precise position information for a player