Save This Page
Home » openjdk-7 » sun » net » www » http » [javadoc | source]
sun.net.www.http
public class: HttpClient [javadoc | source]
java.lang.Object
   sun.net.NetworkClient
      sun.net.www.http.HttpClient

Direct Known Subclasses:
    HttpsClient

Field Summary
protected  boolean cachedHttpClient     
protected  CookieHandler cookieHandler     
 MessageHeader requests     
 PosterOutputStream poster     
 boolean failedOnce     
static final  int httpPortNumber    Default port number for http daemons. REMIND: make these private 
protected  boolean proxyDisabled   
     
    public  boolean usingProxy     
    protected  String host     
    protected  int port     
    protected static  KeepAliveCache kac     
    volatile  boolean keepingAlive     
     int keepAliveConnections     
     int keepAliveTimeout    Idle timeout value, in milliseconds. Zero means infinity, iff keepingAlive=true. Unfortunately, we can't always believe this one. If I'm connected through a Netscape proxy to a server that sent me a keep-alive time of 15 sec, the proxy unilaterally terminates my connection after 5 sec. So we have to hard code our effective timeout to 4 sec for the case where we're using a proxy. *SIGH* 
    protected  URL url    Url being fetched. 
    public  boolean reuse     
    Fields inherited from sun.net.NetworkClient:
    proxy,  serverSocket,  serverOutput,  serverInput,  defaultSoTimeout,  defaultConnectTimeout,  readTimeout,  connectTimeout,  encoding
    Constructor:
     protected HttpClient() 
     protected HttpClient(URL url,
        boolean proxyDisabled) throws IOException 
     public HttpClient(URL url,
        String proxyHost,
        int proxyPort) throws IOException 
     protected HttpClient(URL url,
        Proxy p,
        int to) throws IOException 
     public HttpClient(URL url,
        String proxyHost,
        int proxyPort,
        boolean proxyDisabled,
        int to) throws IOException 
    Method from sun.net.www.http.HttpClient Summary:
    New,   New,   New,   New,   New,   New,   afterConnect,   closeIdleConnection,   closeServer,   finalize,   finished,   getCacheRequest,   getDefaultPort,   getHttpKeepAliveSet,   getInputStream,   getKeepAliveTimeout,   getOutputStream,   getProxyHostUsed,   getProxyPortUsed,   getURLFile,   isCachedConnection,   isInKeepAliveCache,   isKeepingAlive,   needsTunneling,   newHttpProxy,   openServer,   openServer,   parseHTTP,   putInKeepAliveCache,   resetProperties,   setCacheRequest,   setDoNotRetry,   setTimeout,   toString,   writeRequests,   writeRequests
    Methods from sun.net.NetworkClient:
    closeServer,   doConnect,   getConnectTimeout,   getLocalAddress,   getReadTimeout,   openServer,   serverIsOpen,   setConnectTimeout,   setReadTimeout
    Methods from java.lang.Object:
    equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
    Method from sun.net.www.http.HttpClient Detail:
     public static HttpClient New(URL url) throws IOException 
     public static HttpClient New(URL url,
        boolean useCache) throws IOException 
     public static HttpClient New(URL url,
        Proxy p,
        int to) throws IOException 
     public static HttpClient New(URL url,
        Proxy p,
        int to,
        boolean useCache) throws IOException 
     public static HttpClient New(URL url,
        String proxyHost,
        int proxyPort,
        boolean useCache) throws IOException 
     public static HttpClient New(URL url,
        String proxyHost,
        int proxyPort,
        boolean useCache,
        int to) throws IOException 
     public  void afterConnect() throws UnknownHostException, IOException 
     public  void closeIdleConnection() 
     public  void closeServer() 
     protected  void finalize() throws Throwable 
     public  void finished() 
     CacheRequest getCacheRequest() 
     protected int getDefaultPort() 
      return default port number (subclasses may override)
     public boolean getHttpKeepAliveSet() 
     public synchronized InputStream getInputStream() 
     int getKeepAliveTimeout() 
     public OutputStream getOutputStream() 
     public String getProxyHostUsed() 
     public int getProxyPortUsed() 
     public String getURLFile() throws IOException 
     public boolean isCachedConnection() 
     protected boolean isInKeepAliveCache() 
     public final boolean isKeepingAlive() 
     public boolean needsTunneling() 
     protected static Proxy newHttpProxy(String proxyHost,
        int proxyPort,
        String proto) 
     protected synchronized  void openServer() throws IOException 
     public  void openServer(String server,
        int port) throws IOException 
     public boolean parseHTTP(MessageHeader responses,
        ProgressSource pi,
        HttpURLConnection httpuc) throws IOException 
      Parse the first line of the HTTP request. It usually looks something like: "HTTP/1.0 comment\r\n".
     protected synchronized  void putInKeepAliveCache() 
     public static synchronized  void resetProperties() 
    Deprecated! -- - system properties are no longer cached.

      A NOP method kept for backwards binary compatibility
     public  void setCacheRequest(CacheRequest cacheRequest) 
     public  void setDoNotRetry(boolean value) 
     public int setTimeout(int timeout) throws SocketException 
     public String toString() 
     public  void writeRequests(MessageHeader head) 
    Deprecated!
     public  void writeRequests(MessageHeader head,
        PosterOutputStream pos) throws IOException