Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4215767

More control over timeout request is needed (well atleast it would be nice)

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Duplicate
    • Icon: P4 P4
    • None
    • 1.2.0, 1.3.0
    • core-libs
    • generic
    • generic



      Name: dbT83986 Date: 02/27/99


      When waiting for a cgi response I find it can often be faster
      just to drop the current connection and make a new one if it
      hasn't loaded after a second or two.

      I was unable to find what should have been a simple solution to
      retry the url after only a couple of seconds had passed. I
      believe it would be in the benefit of the Java language for you
      to add a feature which would allow the urls to timeout after a
      given amount of time (be it longer or shorter).

      I think the two best ways to approach this are:

          (1) Allow the user to specify a timeout time (sounds funny) when opening the
          connection.
              ex. openConnection(int milliseconds) would be a method in
              the URL class (and possibly the URLConnection class).

          (2) Allow the user to set a specific timeout time for the URL
          connection itself. Therefor any other redirects or change of
          urls will already have the last timeout time to wait.
              ex. setTimeout(int milliseconds) would be a new method in
       the URLConnection class.
      (Review ID: 52703)
      ======================================================================

            jccollet Jean-Christophe Collet (Inactive)
            dblairsunw Dave Blair (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: