Win a copy of The Way of the Web Tester: A Beginner's Guide to Automating Tests this week in the Testing forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JDK 1.4 and HttpURLConnection

Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi every body,
JavaSoft has solved the bug of that blocks forever if the network conditions are bad.
They have introduced in JDK 1.4 the SocketTimeoutException exception, and also the that customizes the way sockets are created.
I was expecting that for example, HttpURLConnection, would provide a new method called setSocketFactory(SocketFactory) to customize the underlying socket, but I did not find any !!!
Ok, I will subclass SocketFactory, and I will override its abstract methods. But what should I do to tell HttpURLConnection to use this SocketFactory to create its underlying socket ???
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic