public List < Message > requestArtistMenuFrom ( final SlotReference slotReference , final int sortOrder ) throws Exception { ConnectionManager . ClientTask < List < Message >> task = new ConnectionManager . ClientTask < List < Message > > ( ) { @ Override public List < Message > useClient ( Client client ) throws Exception { if ( client . tryLockingForMenuOperations ( MetadataFinder . MENU_TIMEOUT , TimeUnit . SECONDS ) ) { try { logger . debug ( "Requesting Artist menu." ) ; Message response = client . menuRequest ( Message . KnownType . ARTIST_MENU_REQ , Message . MenuIdentifier . MAIN_MENU , slotReference . slot , new NumberField ( sortOrder ) ) ; return client . renderMenuItems ( Message . MenuIdentifier . MAIN_MENU , slotReference . slot , CdjStatus . TrackType . REKORDBOX , response ) ; } finally { client . unlockForMenuOperations ( ) ; } } else { throw new TimeoutException ( "Unable to lock player for menu operations." ) ; } } } ; return ConnectionManager . getInstance ( ) . invokeWithClientSession ( slotReference . player , task , "requesting artist menu" ) ; }
Ask the specified player for an Artist menu .