File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Sockets and Internet Protocols and the fly likes Hoe to get Socket Time Out Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Reply Bookmark "Hoe to get Socket Time Out " Watch "Hoe to get Socket Time Out " New topic
Author

Hoe to get Socket Time Out

suneel kota
Greenhorn

Joined: Jun 06, 2006
Posts: 24
Hi all,

I am using java.net.URL in my program, i am calling a web service with this URL.. But i need to get the Socket time out if service is not available. How can it be done..

My requirement is when ever service is not available for 10 seconds i need to call an error page.

please suggest me..

Regards
SuneelKota
Joe Ess
Bartender

Joined: Oct 29, 2001
Posts: 8259

java.net.URLConnection, which you can create from URL, has several methods for managing timeout values.


"blabbing like a narcissistic fool with a superiority complex" ~ N.A.
[How To Ask Questions On JavaRanch]
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Hoe to get Socket Time Out
 
Similar Threads
Keep-Alive Header and Web Services
Socket Programing
need help-->"RPG socket server ".
How to send continous data from serice to activity?
Please the arthur of Java NIO talk about the Select and Channel