List<Message> getFullTrackList(final CdjStatus.TrackSourceSlot slot, final Client client, final int sortOrder)
            throws IOException, InterruptedException, TimeoutException {
        // Send the metadata menu request
        if (client.tryLockingForMenuOperations(MENU_TIMEOUT, TimeUnit.SECONDS)) {
            try {
                Message response = client.menuRequest(Message.KnownType.TRACK_MENU_REQ, Message.MenuIdentifier.MAIN_MENU, slot,
                        new NumberField(sortOrder));
                final long count = response.getMenuResultsCount();
                if (count == Message.NO_MENU_RESULTS_AVAILABLE || count == 0) {
                    return Collections.emptyList();
                }

                // Gather all the metadata menu items
                return client.renderMenuItems(Message.MenuIdentifier.MAIN_MENU, slot, CdjStatus.TrackType.REKORDBOX, response);
            }
            finally {
                client.unlockForMenuOperations();
            }
        } else {
            throw new TimeoutException("Unable to lock the player for menu operations");
        }
    }
List < Message > getFullTrackList ( final CdjStatus . TrackSourceSlot slot , final Client client , final int sortOrder ) throws IOException , InterruptedException , TimeoutException { if ( client . tryLockingForMenuOperations ( MENU_TIMEOUT , TimeUnit . SECONDS ) ) { try { Message response = client . menuRequest ( Message . KnownType . TRACK_MENU_REQ , Message . MenuIdentifier . MAIN_MENU , slot , new NumberField ( sortOrder ) ) ; final long count = response . getMenuResultsCount ( ) ; if ( count == Message . NO_MENU_RESULTS_AVAILABLE || count == 0 ) { return Collections . emptyList ( ) ; } return client . renderMenuItems ( Message . MenuIdentifier . MAIN_MENU , slot , CdjStatus . TrackType . REKORDBOX , response ) ; } finally { client . unlockForMenuOperations ( ) ; } } else { throw new TimeoutException ( "Unable to lock the player for menu operations" ) ; } }
Request the list of all tracks in the specified slot, given a dbserver connection to a player that has already
been set up.

@param slot identifies the media slot we are querying
@param client the dbserver client that is communicating with the appropriate player

@return the retrieved track list entry items

@throws IOException if there is a communication problem
@throws InterruptedException if the thread is interrupted while trying to lock the client for menu operations
@throws TimeoutException if we are unable to lock the client for menu operations