private void setToken ( String userToken , UserDetail userDetail , boolean loginPending ) { boolean changed = ! isEqual ( this . userToken , userToken ) ; this . userToken = userToken ; if ( null == userDetail ) { userDetail = new UserDetail ( ) ; } this . userDetail = userDetail ; if ( changed ) { TokenChangedEvent event = new TokenChangedEvent ( userToken , userDetail , loginPending ) ; manager . fireEvent ( event ) ; } }
Set the user token so it can be sent in every command . This is the internal version used by the token changed handler .