this is mycunstom code ....
public HttpResponseObject execute(HttpRequestObject request) {
JSONObject body = request.getBody();
JSONObject jsonResponse = null;
try {
jsonResponse = SummonHero(GameMsg,strUserName);
} catch (JSONException e) {
}
return new HttpResponseObject(HTTP_STATUS_SUCCESS, jsonResponse);
---> this is my callback function()
public JSONObject SummonHero( final int GameMsg, final String strUserName )
{
final JSONObject responseJSON = new JSONObject();//create response summonhero json by zet 160205
Query q1 = QueryBuilder.build("name", strUserName, Operator.EQUALS);
storageService.findDocumentsByQuery(dbName,"BattleInfo",q1, new App42CallBack() {
public void onSuccess(Object response){
---> this is my callback ok
}
i want to control data inside App42CallBack after return new HttpResponseObject(HTTP_STATUS_SUCCESS, jsonResponse); function.....
but return new HttpResponseObject(HTTP_STATUS_SUCCESS, jsonResponse) call !!!! before App42CallBack() onSuccess() function call !!!!!
how can i controll callback function before return new HttpResponseObject(HTTP_STATUS_SUCCESS, jsonResponse); call?