Back to project page android-mvc-framework.
The source code is released under:
Apache License
If you think the Android project android-mvc-framework listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.android_mvc.framework.net.old; // www.j a va 2 s . c o m import android.os.Handler; import android.os.Message; /** * HTTP?????POST??????????????????????????????? * ???????????????UI?????????????????????????? * @author id:language_and_engineering * */ public abstract class HttpPostHandler extends Handler { /** * ????????????????????????Message???????????????????? * ????????????????????????????????? */ public void handleMessage(Message msg) { boolean isPostSuccess = msg.getData().getBoolean("http_post_success"); String http_response = msg.getData().get("http_response").toString(); if( isPostSuccess ) { onPostCompleted( http_response ); } else { onPostFailed( http_response ); } onFinally(); } // ???override??????????????????????????????????????? // ??????????????????????????????????????????????????????????????? // ????????????????????????????????????????????? /** * ???????????????????????? */ public abstract void onPostCompleted( String response ); // ??????onPostSuccess????????????onPostCompleted????????????????? // ????????????????????????????????????????????? /** * ?????????????????????? */ public abstract void onPostFailed( String response ); /** * ????????????????????????????? */ public void onFinally() { // Override me } }