title: How to return the value from inner class to outer class?
body: <p>What I want to do is when <code>onSuccess</code> method executed, the <code>queryLogin</code> return <code>true</code>,while if <code>onFailuer</code> method executed , the <code>queryLogin</code> return <code>false</code>;
  But as you know, in java, I cannot modify an outer class value from the inner class. So I just wonder how can I solve the problem and achieve my aim.</p>
  
  <pre><code> public static boolean queryLogin(String username, String passowrd){
      boolean isSuccess = false;
      params.put("username", username);
      params.put("password", passowrd);
      VStarRestClient.post(LOGIN_URL, params, new AsyncHttpResponseHandler() {
          @Override
          public void onSuccess(int statusCode, Header[] headers, byte[] responseBody) {
              isSuccess = true;//cannot
          }
  
          @Override
          public void onFailure(int statusCode, Header[] headers, byte[] responseBody, Throwable error) {
              String responseContent = new String(responseBody);
              isSuccess = false;//cannot
          }
      });
  
      return isSuccess;
  }
  </code></pre>