@Override protected AsyncHttpRequest newAsyncHttpRequest(DefaultHttpClient client, HttpContext httpContext, HttpUriRequest uriRequest, String contentType, ResponseHandlerInterface responseHandler, Context context) { AsyncHttpRequest httpRequest = getHttpRequest(client, httpContext, uriRequest, contentType, responseHandler, context); return httpRequest == null ? super.newAsyncHttpRequest(client, httpContext, uriRequest, contentType, responseHandler, context) : httpRequest; }
@Override public AsyncHttpRequest getHttpRequest(DefaultHttpClient client, HttpContext httpContext, HttpUriRequest uriRequest, String contentType, ResponseHandlerInterface responseHandler, Context context) { return null; }
@Override public AsyncHttpRequest getHttpRequest(DefaultHttpClient client, HttpContext httpContext, HttpUriRequest uriRequest, String contentType, ResponseHandlerInterface responseHandler, Context context) { return new PrePostProcessRequest(client, httpContext, uriRequest, responseHandler); }
@Override public void onPreProcessRequest(AsyncHttpRequest request) { debugProcessing(LOG_TAG, "Pre", "Request is about to be pre-processed", LIGHTGREY); }
@Override public void onPostProcessRequest(AsyncHttpRequest request) { debugProcessing(LOG_TAG, "Post", "Request is about to be post-processed", DARKGREY); }
@Override protected AsyncHttpRequest newAsyncHttpRequest(DefaultHttpClient client, HttpContext httpContext, HttpUriRequest uriRequest, String contentType, ResponseHandlerInterface responseHandler, Context context) { return new CheckNetAsyncHttpRequest(client, httpContext, uriRequest, responseHandler); }
/** The original HTTP request. */ AsyncHttpRequest request();
/** * Instantiate a new asynchronous HTTP request for the passed parameters. * * @param client * HttpClient to be used for request, can differ in single * requests * @param contentType * MIME body type, for POST and PUT requests, may be null * @param context * Context of Android application, to hold the reference of * request * @param httpContext * HttpContext in which the request will be executed * @param responseHandler * ResponseHandler or its subclass to put the response into * @param uriRequest * instance of HttpUriRequest, which means it must be of * HttpDelete, HttpPost, HttpGet, HttpPut, etc. * @return AsyncHttpRequest ready to be dispatched */ @Override protected AsyncHttpRequest newAsyncHttpRequest(DefaultHttpClient client, HttpContext httpContext, HttpUriRequest uriRequest, String contentType, ResponseHandlerInterface responseHandler, Context context) { return new AutoHttpRequest(client, httpContext, uriRequest, responseHandler, getHttpConfig()); }
AsyncHttpRequest getHttpRequest(DefaultHttpClient client, HttpContext httpContext, HttpUriRequest uriRequest, String contentType, ResponseHandlerInterface responseHandler, Context context);