Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #11011
| Path | csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!.POSTED!not-for-mail |
|---|---|
| From | Roedy Green <see_website@mindprod.com.invalid> |
| Newsgroups | comp.lang.java.programmer |
| Subject | Re: Java listener |
| Date | Tue, 27 Dec 2011 12:33:40 -0800 |
| Organization | Canadian Mind Products |
| Lines | 40 |
| Message-ID | <rqakf7d8t6m2ofncucom4evrgcb3uug2ev@4ax.com> (permalink) |
| References | <9a7gf750th7582hnjvfv9n0iko35omb57o@4ax.com> |
| Reply-To | Roedy Green <see_website@mindprod.com.invalid> |
| NNTP-Posting-Host | Z2l1DcCELS0rATq8NqV4Sw.user.speranza.aioe.org |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=us-ascii |
| Content-Transfer-Encoding | 7bit |
| X-Complaints-To | abuse@aioe.org |
| X-Notice | Filtered by postfilter v. 0.8.2 |
| X-Newsreader | Forte Agent 6.00/32.1186 |
| Xref | x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:11011 |
Show key headers only | View raw
On Sun, 25 Dec 2011 23:12:55 -0800, Jim Lee <jimlee2907@yahoo.com>
wrote, quoted or indirectly quoted someone who said :
>I have a java interface "ConnectionListener" ...
>
>And a method "httpPost" which pass a "ConnectionListener" as parameter
>
>How do I implement the ConnectionListener interface and how do I pass
>it into "httpPost" method to get invoked when "listener event" get
>response from the httpPost?
>
>=====================================
>
>public void httpPost(String url, List<Header> headers, HttpEntity
>body, ConnectionListener listener) {
> HttpPostTask task = new HttpPostTask(url, headers, body,
>listener);
> mExecutor.submit(task);
>}
>
>=====================================
>import java.io.InputStream;
>import org.apache.http.HttpMessage;
>
>public interface ConnectionListener {
>
> public void onConnection(int status, InputStream is,
>HttpMessage message);
>
> public void onConnectionException(Exception e);
>}
You might use somebody else's code, such as Apache HTTPClient or mine
http://mindprod.com/products.html#HTTP
--
Roedy Green Canadian Mind Products
http://mindprod.com
If you can't remember the name of some method,
consider changing it to something you can remember.
Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Find similar | Unroll thread
Java listener Jim Lee <jimlee2907@yahoo.com> - 2011-12-25 23:12 -0800
Re: Java listener "John B. Matthews" <nospam@nospam.invalid> - 2011-12-26 10:58 -0500
Re: Java listener Arne Vajhøj <arne@vajhoej.dk> - 2011-12-27 17:59 -0500
Re: Java listener markspace <-@.> - 2011-12-26 08:12 -0800
Re: Java listener Roedy Green <see_website@mindprod.com.invalid> - 2011-12-27 12:33 -0800
csiph-web