src/share/classes/sun/net/www/http/HttpClient.java

Print this page




 108      * time of 15 sec, the proxy unilaterally terminates my connection
 109      * after 5 sec.  So we have to hard code our effective timeout to
 110      * 4 sec for the case where we're using a proxy. *SIGH*
 111      */
 112     int keepAliveTimeout = 0;
 113 
 114     /** whether the response is to be cached */
 115     private CacheRequest cacheRequest = null;
 116 
 117     /** Url being fetched. */
 118     protected URL       url;
 119 
 120     /* if set, the client will be reused and must not be put in cache */
 121     public boolean reuse = false;
 122 
 123     // Traffic capture tool, if configured. See HttpCapture class for info
 124     private HttpCapture capture = null;
 125 
 126     private static final PlatformLogger logger = HttpURLConnection.getHttpLogger();
 127     private static void logFinest(String msg) {
 128         if (logger.isLoggable(PlatformLogger.FINEST)) {
 129             logger.finest(msg);
 130         }
 131     }
 132 
 133     /**
 134      * A NOP method kept for backwards binary compatibility
 135      * @deprecated -- system properties are no longer cached.
 136      */
 137     @Deprecated
 138     public static synchronized void resetProperties() {
 139     }
 140 
 141     int getKeepAliveTimeout() {
 142         return keepAliveTimeout;
 143     }
 144 
 145     static {
 146         String keepAlive = java.security.AccessController.doPrivileged(
 147             new sun.security.action.GetPropertyAction("http.keepAlive"));
 148 




 108      * time of 15 sec, the proxy unilaterally terminates my connection
 109      * after 5 sec.  So we have to hard code our effective timeout to
 110      * 4 sec for the case where we're using a proxy. *SIGH*
 111      */
 112     int keepAliveTimeout = 0;
 113 
 114     /** whether the response is to be cached */
 115     private CacheRequest cacheRequest = null;
 116 
 117     /** Url being fetched. */
 118     protected URL       url;
 119 
 120     /* if set, the client will be reused and must not be put in cache */
 121     public boolean reuse = false;
 122 
 123     // Traffic capture tool, if configured. See HttpCapture class for info
 124     private HttpCapture capture = null;
 125 
 126     private static final PlatformLogger logger = HttpURLConnection.getHttpLogger();
 127     private static void logFinest(String msg) {
 128         if (logger.isLoggable(PlatformLogger.Level.FINEST)) {
 129             logger.finest(msg);
 130         }
 131     }
 132 
 133     /**
 134      * A NOP method kept for backwards binary compatibility
 135      * @deprecated -- system properties are no longer cached.
 136      */
 137     @Deprecated
 138     public static synchronized void resetProperties() {
 139     }
 140 
 141     int getKeepAliveTimeout() {
 142         return keepAliveTimeout;
 143     }
 144 
 145     static {
 146         String keepAlive = java.security.AccessController.doPrivileged(
 147             new sun.security.action.GetPropertyAction("http.keepAlive"));
 148