artiya4u / google-http-java-client

Automatically exported from code.google.com/p/google-http-java-client
0 stars 0 forks source link

Ability to cancel request execution #172

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
External references, such as a standards document, or specification?

http://javadoc.google-http-java-client.googlecode.com/hg/1.12.0-beta/com/google/
api/client/http/HttpRequest.html

http://code.google.com/p/google-http-java-client/issues/detail?id=2

https://code.google.com/p/google-api-java-client/issues/detail?id=671

Java environments (e.g. Java 6, Android 2.3, App Engine, or All)?

All

Please describe the feature requested.

If an application has a cancel button, it may want to abort the current 
operation.  If the current operation is an HTTP request execute, it may be 
expensive to wait for it to complete.  Once possible way to accomplish this is 
to simply shut down the thread in which the HTTP request is running.  That may 
be a bit too rough for some applications, and may not fit the threading model 
of some use cases, such as with AsyncTask example linked above.  Instead one 
may wish to do a soft cancellation, in which some isCanceled flag is checked 
frequently whenever it is convenient to do so.

Note that HttpRequest is currently not designed for being called from a second 
thread.  So such a change would be a fairly significant one from a design point 
of view.

Original issue reported on code.google.com by yan...@google.com on 3 Dec 2012 at 4:06

GoogleCodeExporter commented 9 years ago

Original comment by yan...@google.com on 9 Jan 2013 at 2:54

GoogleCodeExporter commented 9 years ago

Original comment by yan...@google.com on 20 Jan 2013 at 1:57

GoogleCodeExporter commented 9 years ago

Original comment by yan...@google.com on 6 Feb 2013 at 11:54

GoogleCodeExporter commented 9 years ago

Original comment by yan...@google.com on 10 Jun 2013 at 1:07

GoogleCodeExporter commented 9 years ago

Original comment by pele...@google.com on 29 Jul 2013 at 6:11

GoogleCodeExporter commented 9 years ago

Original comment by ngmic...@google.com on 3 Sep 2013 at 8:02

GoogleCodeExporter commented 9 years ago

Original comment by yan...@google.com on 27 Sep 2013 at 11:56