Re: [android-developers] Re: Identifying HTTP Get requests in Android

2012-12-27 Thread Archana
Hi, Does the server in the hc.apache.org/httpcomponents-core-ga/httpcore/examples/org/apache/http/examples/ElementalHttpServer.java work in Android? When I try to use the constructor, HttpService(HttpProcessor processor, ConnectionReuseStrategy connStrategy, HttpResponseFactory

Re: [android-developers] Re: Identifying HTTP Get requests in Android

2012-12-27 Thread skink
Archana wrote: Hi, Does the server in the hc.apache.org/httpcomponents-core-ga/httpcore/examples/org/apache/http/examples/ElementalHttpServer.java work in Android? When I try to use the constructor, HttpService(HttpProcessor processor, ConnectionReuseStrategy connStrategy,

Re: [android-developers] Re: Identifying HTTP Get requests in Android

2012-12-27 Thread Archana r
The link contains code where a separate thread is started for each request. Can I use it? Can you please explain your comment? Thanks! On Thu, Dec 27, 2012 at 1:33 PM, skink psk...@gmail.com wrote: Archana wrote: Hi, Does the server in the

Re: [android-developers] Re: Identifying HTTP Get requests in Android

2012-12-27 Thread skink
Archana r wrote: The link contains code where a separate thread is started for each request. Can I use it? yes pskink -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to

Re: [android-developers] Re: Identifying HTTP Get requests in Android

2012-12-19 Thread Archana
Hi, I m implementing threads first. Can I use Basic HTTP server from the link http://hc.apache.org/httpcomponents-core-ga/examples.html ? Can you please let me know the difference between handling blocking requests and blocking IO(as specified in the link). Thanks! On Tuesday, December 18,

Re: [android-developers] Re: Identifying HTTP Get requests in Android

2012-12-19 Thread skink
Archana wrote: Hi, I m implementing threads first. Can I use Basic HTTP server from the link http://hc.apache.org/httpcomponents-core-ga/examples.html ? Can you please let me know the difference between handling blocking requests and blocking IO(as specified in the link). Thanks!

Re: [android-developers] Re: Identifying HTTP Get requests in Android

2012-12-18 Thread Archana
I read using threads causes overhead, performance and scalability issues. It is efficient if there are a limited number of clients. So I think using java.nio would be the best option. Any example that shows handling the HTTP methods without blocking. On Monday, December 17, 2012 7:06:00 PM

Re: [android-developers] Re: Identifying HTTP Get requests in Android

2012-12-18 Thread Kristopher Micinski
Maybe you should try to use threads first and see what happens... :-) It's funny you mention that you don't want to use this approach because it has overhead, performance and scalability issues: running a server on Android has those issues! If you are really concerned about performance and

Re: [android-developers] Re: Identifying HTTP Get requests in Android

2012-12-18 Thread skink
Archana wrote: I read using threads causes overhead, performance and scalability issues. It is efficient if there are a limited number of clients. So I think using java.nio would be the best option. Any example that shows handling the HTTP methods without blocking. how many concurrent

Re: [android-developers] Re: Identifying HTTP Get requests in Android

2012-12-17 Thread Archana
Hi, Seems like org.apache.http.nio.protocol.HttpAsyncService does not exist in Android. Can anybody suggest me how to make my HTTP Server asynchronous? Any help is appreciated. Thanks in advance! On Friday, December 14, 2012 8:56:05 AM UTC+2, Archana wrote: Hi Kris, Can I use

Re: [android-developers] Re: Identifying HTTP Get requests in Android

2012-12-17 Thread skink
Archana wrote: Hi, Seems like org.apache.http.nio.protocol.HttpAsyncService does not exist in Android. Can anybody suggest me how to make my HTTP Server asynchronous? Any help is appreciated. Thanks in advance! quoting Kris: But if you insist that your app is special, the common

Re: [android-developers] Re: Identifying HTTP Get requests in Android

2012-12-17 Thread Archana
Hi, Is it like having separate thread for each request(GET/POST/DELETE) ? Can you please explain? I was also thinking of AsyncTask, message queue or multithreading. Thanks! On Monday, December 17, 2012 1:28:25 PM UTC+2, skink wrote: Archana wrote: Hi, Seems like

Re: [android-developers] Re: Identifying HTTP Get requests in Android

2012-12-17 Thread skink
Archana wrote: Hi, Is it like having separate thread for each request(GET/POST/DELETE) ? yes pskink -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To

Re: [android-developers] Re: Identifying HTTP Get requests in Android

2012-12-17 Thread Kristopher Micinski
On Mon, Dec 17, 2012 at 6:35 AM, Archana ramalingam.arch...@gmail.com wrote: Hi, Is it like having separate thread for each request(GET/POST/DELETE) ? Can you please explain? I was also thinking of AsyncTask, message queue or multithreading. Thanks! Basically, those are all equivalent...

Re: [android-developers] Re: Identifying HTTP Get requests in Android

2012-12-13 Thread Archana
I m getting a Timeout or No Response from server in Mozilla Poster(when I issue GET and DELETE requests), while able to see the response from the server in the logs. So I thought, this is due to blocking of sockets/ports(as I am utilizing only one in my case). On Thursday, December 13, 2012

Re: [android-developers] Re: Identifying HTTP Get requests in Android

2012-12-13 Thread skink
Archana wrote: I m getting a Timeout or No Response from server in Mozilla Poster(when I issue GET and DELETE requests), while able to see the response from the server in the logs. So I thought, this is due to blocking of sockets/ports(as I am utilizing only one in my case). and your

Re: [android-developers] Re: Identifying HTTP Get requests in Android

2012-12-13 Thread Archana
I m including the server code for GET request. Post and delete follow the same pattern: while(true){ socket = serverSocket.accept(); conn = new DefaultHttpServerConnection(); conn.bind(socket,new BasicHttpParams());

Re: [android-developers] Re: Identifying HTTP Get requests in Android

2012-12-13 Thread skink
Archana wrote: I m including the server code for GET request. Post and delete follow the same pattern: did you try to debug it and see where it hangs? pskink -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send

Re: [android-developers] Re: Identifying HTTP Get requests in Android

2012-12-13 Thread Archana
Hi, when I issue GET, POST requests simultaneously, timeout occurs in Mozilla Poster (as I mentioned below). I need to handle asynchronous requests (non-blocking) as I m using the same socket/port. On Thursday, December 13, 2012 11:20:09 AM UTC+2, skink wrote: Archana wrote: I m

Re: [android-developers] Re: Identifying HTTP Get requests in Android

2012-12-13 Thread skink
Archana wrote: Hi, when I issue GET, POST requests simultaneously, timeout occurs in Mozilla Poster (as I mentioned below). I need to handle asynchronous requests (non-blocking) as I m using the same socket/port. so follow Kris's advice, he already answered what to do pskink -- You

Re: [android-developers] Re: Identifying HTTP Get requests in Android

2012-12-13 Thread Archana
Hi Kris, Can I use HttpAsyncRequestHandler and HttpAsyncService for my Android app? Can I use the same socket/port in this case? Thanks! On Thursday, December 13, 2012 12:22:57 PM UTC+2, skink wrote: Archana wrote: Hi, when I issue GET, POST requests simultaneously, timeout occurs in

[android-developers] Re: Identifying HTTP Get requests in Android

2012-12-12 Thread Archana
Hi, I used request.getRequestLine().getMethod(); that tells me if the method is GET/DELETE/POST and handle it accordingly. Any idea of how can I make my HTTP server in the Android phone non-blocking? I mean to simultaneously handle POST, GET and DELETE requests ? Thank you! On Tuesday,

Re: [android-developers] Re: Identifying HTTP Get requests in Android

2012-12-12 Thread Kristopher Micinski
This is nothing Android specific. Designing HTTP servers that follow this pattern is a common Java problem, but in my mind there is no reason that you should be doing this on Android. Instead you should be communicating with your service using messages to and from a service using a smart

Re: [android-developers] Re: Identifying HTTP Get requests in Android

2012-12-12 Thread Archana
Hi, Thanks for the input. It is part of research project (so we are using HTTP servers) and we also want to monitor battery in this scenario. As I am relatively new to developing these, please let me know if I am to use the code similar to Page 31, 32 of

[android-developers] Re: Identifying HTTP Get requests in Android

2012-12-04 Thread Archana
Hi, is it using HttpService.handleRequest? Please help as I dont have much idea of using HTTP Core. On Monday, December 3, 2012 3:26:48 PM UTC+2, skink wrote: Archana wrote: My question is when I use Poster, how will the server(in the phone) know that it has received Http Get or

[android-developers] Re: Identifying HTTP Get requests in Android

2012-12-04 Thread skink
Archana wrote: Hi, is it using HttpService.handleRequest? Please help as I dont have much idea of using HTTP Core. i have not used HttpService so cant help much pskink -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to

[android-developers] Re: Identifying HTTP Get requests in Android

2012-12-03 Thread skink
Archana wrote: Hi all, I ve implemented HTTP in Android using 2 devices. They communicate with each other when one acts as server and other as client. But my question is if I issue a HTTP Get request from Poster, example, http://IP address:port number to server in one phone, how will I

[android-developers] Re: Identifying HTTP Get requests in Android

2012-12-03 Thread Archana
My question is when I use Poster, how will the server(in the phone) know that it has received Http Get or Delete requests? Thanks On Monday, December 3, 2012 3:11:02 PM UTC+2, skink wrote: Archana wrote: Hi all, I ve implemented HTTP in Android using 2 devices. They communicate

[android-developers] Re: Identifying HTTP Get requests in Android

2012-12-03 Thread skink
Archana wrote: My question is when I use Poster, how will the server(in the phone) know that it has received Http Get or Delete requests? Thanks see HttpRequest docs pskink -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to