private void login ( final String oldToken ) { tokenRequestHandler . login ( new TokenChangedHandler ( ) { public void onTokenChanged ( TokenChangedEvent event ) { setToken ( event . getToken ( ) , event . getUserDetail ( ) , false ) ; List < RetryCommand > retryCommands = afterLoginCommands . remove ( oldToken ) ; if ( null != retryCommands ) { for ( RetryCommand retryCommand : retryCommands ) { execute ( retryCommand . getCommand ( ) , retryCommand . getDeferred ( ) ) ; } } } } ) ; }
Force request a new login the dangling commands for the previous token are retried when logged in .