Save This Page
Home » openjdk-7 » sun.net.www.protocol » https » [javadoc | source]
sun.net.www.protocol.https
public class: HttpsURLConnectionImpl [javadoc | source]
java.lang.Object
   java.net.URLConnection
      java.net.HttpURLConnection
         javax.net.ssl.HttpsURLConnection
            sun.net.www.protocol.https.HttpsURLConnectionImpl
A class to represent an HTTP connection to a remote object. Ideally, this class should subclass and inherit the http handler implementation, but it can't do so because that class have the wrong Java Type. Thus it uses the delegate (aka, the Adapter/Wrapper design pattern) to reuse code from the http handler. Since it would use a delegate to access sun.net.www.protocol.http.HttpURLConnection functionalities, it needs to implement all public methods in it's super class and all the way to Object.
Field Summary
protected  DelegateHttpsURLConnection delegate     
Fields inherited from java.net.HttpURLConnection:
HTTP_OK,  HTTP_CREATED,  HTTP_ACCEPTED,  HTTP_NOT_AUTHORITATIVE,  HTTP_NO_CONTENT,  HTTP_RESET,  HTTP_PARTIAL,  HTTP_MULT_CHOICE,  HTTP_MOVED_PERM,  HTTP_MOVED_TEMP,  HTTP_SEE_OTHER,  HTTP_NOT_MODIFIED,  HTTP_USE_PROXY,  HTTP_BAD_REQUEST,  HTTP_UNAUTHORIZED,  HTTP_PAYMENT_REQUIRED,  HTTP_FORBIDDEN,  HTTP_NOT_FOUND,  HTTP_BAD_METHOD,  HTTP_NOT_ACCEPTABLE,  HTTP_PROXY_AUTH,  HTTP_CLIENT_TIMEOUT,  HTTP_CONFLICT,  HTTP_GONE,  HTTP_LENGTH_REQUIRED,  HTTP_PRECON_FAILED,  HTTP_ENTITY_TOO_LARGE,  HTTP_REQ_TOO_LONG,  HTTP_UNSUPPORTED_TYPE,  HTTP_SERVER_ERROR,  HTTP_INTERNAL_ERROR,  HTTP_NOT_IMPLEMENTED,  HTTP_BAD_GATEWAY,  HTTP_UNAVAILABLE,  HTTP_GATEWAY_TIMEOUT,  HTTP_VERSION
Constructor:
 protected HttpsURLConnectionImpl(URL u) throws IOException 
 HttpsURLConnectionImpl(URL u,
    Handler handler) throws IOException 
 HttpsURLConnectionImpl(URL u,
    Proxy p,
    Handler handler) throws IOException 
Method from sun.net.www.protocol.https.HttpsURLConnectionImpl Summary:
addRequestProperty,   connect,   disconnect,   equals,   finalize,   getAllowUserInteraction,   getCipherSuite,   getConnectTimeout,   getContent,   getContent,   getContentEncoding,   getContentLength,   getContentLengthLong,   getContentType,   getDate,   getDefaultUseCaches,   getDoInput,   getDoOutput,   getErrorStream,   getExpiration,   getHeaderField,   getHeaderField,   getHeaderFieldDate,   getHeaderFieldInt,   getHeaderFieldKey,   getHeaderFieldLong,   getHeaderFields,   getIfModifiedSince,   getInputStream,   getInstanceFollowRedirects,   getLastModified,   getLocalCertificates,   getLocalPrincipal,   getOutputStream,   getPeerPrincipal,   getPermission,   getReadTimeout,   getRequestMethod,   getRequestProperties,   getRequestProperty,   getResponseCode,   getResponseMessage,   getServerCertificateChain,   getServerCertificates,   getURL,   getUseCaches,   hashCode,   isConnected,   setAllowUserInteraction,   setChunkedStreamingMode,   setConnectTimeout,   setConnected,   setDefaultUseCaches,   setDoInput,   setDoOutput,   setFixedLengthStreamingMode,   setIfModifiedSince,   setInstanceFollowRedirects,   setNewClient,   setNewClient,   setProxiedClient,   setProxiedClient,   setReadTimeout,   setRequestMethod,   setRequestProperty,   setUseCaches,   toString,   usingProxy
Methods from javax.net.ssl.HttpsURLConnection:
getCipherSuite,   getDefaultHostnameVerifier,   getDefaultSSLSocketFactory,   getHostnameVerifier,   getLocalCertificates,   getLocalPrincipal,   getPeerPrincipal,   getSSLSocketFactory,   getServerCertificates,   setDefaultHostnameVerifier,   setDefaultSSLSocketFactory,   setHostnameVerifier,   setSSLSocketFactory
Methods from java.net.HttpURLConnection:
disconnect,   getErrorStream,   getFollowRedirects,   getHeaderField,   getHeaderFieldDate,   getHeaderFieldKey,   getInstanceFollowRedirects,   getPermission,   getRequestMethod,   getResponseCode,   getResponseMessage,   setChunkedStreamingMode,   setFixedLengthStreamingMode,   setFollowRedirects,   setInstanceFollowRedirects,   setRequestMethod,   usingProxy
Methods from java.net.URLConnection:
addRequestProperty,   connect,   getAllowUserInteraction,   getConnectTimeout,   getContent,   getContent,   getContentEncoding,   getContentLength,   getContentType,   getDate,   getDefaultAllowUserInteraction,   getDefaultRequestProperty,   getDefaultUseCaches,   getDoInput,   getDoOutput,   getExpiration,   getFileNameMap,   getHeaderField,   getHeaderField,   getHeaderFieldDate,   getHeaderFieldInt,   getHeaderFieldKey,   getHeaderFields,   getIfModifiedSince,   getInputStream,   getLastModified,   getOutputStream,   getPermission,   getReadTimeout,   getRequestProperties,   getRequestProperty,   getURL,   getUseCaches,   guessContentTypeFromName,   guessContentTypeFromStream,   setAllowUserInteraction,   setConnectTimeout,   setContentHandlerFactory,   setDefaultAllowUserInteraction,   setDefaultRequestProperty,   setDefaultUseCaches,   setDoInput,   setDoOutput,   setFileNameMap,   setIfModifiedSince,   setReadTimeout,   setRequestProperty,   setUseCaches,   toString
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from sun.net.www.protocol.https.HttpsURLConnectionImpl Detail:
 public  void addRequestProperty(String key,
    String value) 
    Adds a general request property specified by a key-value pair. This method will not overwrite existing values associated with the same key.
 public  void connect() throws IOException 
    Implements the HTTP protocol handler's "connect" method, establishing an SSL connection to the server as necessary.
 public  void disconnect() 
    Disconnect from the server.
 public boolean equals(Object obj) 
 protected  void finalize() throws Throwable 
 public boolean getAllowUserInteraction() 
 public String getCipherSuite() 
    Returns the cipher suite in use on this connection.
 public int getConnectTimeout() 
 public Object getContent() throws IOException 
 public Object getContent(Class[] classes) throws IOException 
 public String getContentEncoding() 
 public int getContentLength() 
 public long getContentLengthLong() 
 public String getContentType() 
 public long getDate() 
 public boolean getDefaultUseCaches() 
 public boolean getDoInput() 
 public boolean getDoOutput() 
 public InputStream getErrorStream() 
 public long getExpiration() 
 public String getHeaderField(String name) 
    Gets a header field by name. Returns null if not known.
 public String getHeaderField(int n) 
    Gets a header field by index. Returns null if not known.
 public long getHeaderFieldDate(String name,
    long Default) 
 public int getHeaderFieldInt(String name,
    int Default) 
 public String getHeaderFieldKey(int n) 
    Gets a header field by index. Returns null if not known.
 public long getHeaderFieldLong(String name,
    long Default) 
 public Map getHeaderFields() 
    Returns an unmodifiable Map of the header fields. The Map keys are Strings that represent the response-header field names. Each Map value is an unmodifiable List of Strings that represents the corresponding field values.
 public long getIfModifiedSince() 
 public synchronized InputStream getInputStream() throws IOException 
 public boolean getInstanceFollowRedirects() 
 public long getLastModified() 
 public Certificate[] getLocalCertificates() 
    Returns the certificate chain the client sent to the server, or null if the client did not authenticate.
 public Principal getLocalPrincipal() 
    Returns the principal the client sent to the server, or null if the client did not authenticate.
 public synchronized OutputStream getOutputStream() throws IOException 
 public Principal getPeerPrincipal() throws SSLPeerUnverifiedException 
    Returns the principal with which the server authenticated itself, or throw a SSLPeerUnverifiedException if the server did not authenticate.
 public Permission getPermission() throws IOException 
 public int getReadTimeout() 
 public String getRequestMethod() 
 public Map getRequestProperties() 
    Returns an unmodifiable Map of general request properties for this connection. The Map keys are Strings that represent the request-header field names. Each Map value is a unmodifiable List of Strings that represents the corresponding field values.
 public String getRequestProperty(String key) 
 public int getResponseCode() throws IOException 
    Overwrite super class method
 public String getResponseMessage() throws IOException 
 public X509Certificate[] getServerCertificateChain() 
    Returns the server's X.509 certificate chain, or null if the server did not authenticate. NOTE: This method is not necessary for the version of this class implementing javax.net.ssl.HttpsURLConnection, but provided for compatibility with the com.sun.net.ssl.HttpsURLConnection version.
 public Certificate[] getServerCertificates() throws SSLPeerUnverifiedException 
    Returns the server's certificate chain, or throws SSLPeerUnverified Exception if the server did not authenticate.
 public URL getURL() 
 public boolean getUseCaches() 
 public int hashCode() 
 protected boolean isConnected() 
    Used by subclass to access "connected" variable. Since we are delegating the actual implementation to "delegate", we need to delegate the access of "connected" as well.
 public  void setAllowUserInteraction(boolean allowuserinteraction) 
 public  void setChunkedStreamingMode(int chunklen) 
 public  void setConnectTimeout(int timeout) 
 protected  void setConnected(boolean conn) 
    Used by subclass to access "connected" variable. Since we are delegating the actual implementation to "delegate", we need to delegate the access of "connected" as well.
 public  void setDefaultUseCaches(boolean defaultusecaches) 
 public  void setDoInput(boolean doinput) 
 public  void setDoOutput(boolean dooutput) 
 public  void setFixedLengthStreamingMode(int contentLength) 
 public  void setIfModifiedSince(long ifmodifiedsince) 
 public  void setInstanceFollowRedirects(boolean shouldFollow) 
 protected  void setNewClient(URL url) throws IOException 
    Create a new HttpClient object, bypassing the cache of HTTP client objects/connections.
 protected  void setNewClient(URL url,
    boolean useCache) throws IOException 
    Obtain a HttpClient object. Use the cached copy if specified.
 protected  void setProxiedClient(URL url,
    String proxyHost,
    int proxyPort) throws IOException 
    Create a new HttpClient object, set up so that it uses per-instance proxying to the given HTTP proxy. This bypasses the cache of HTTP client objects/connections.
 protected  void setProxiedClient(URL url,
    String proxyHost,
    int proxyPort,
    boolean useCache) throws IOException 
    Obtain a HttpClient object, set up so that it uses per-instance proxying to the given HTTP proxy. Use the cached copy of HTTP client objects/connections if specified.
 public  void setReadTimeout(int timeout) 
 public  void setRequestMethod(String method) throws ProtocolException 
 public  void setRequestProperty(String key,
    String value) 
    Sets request property. If a property with the key already exists, overwrite its value with the new value.
 public  void setUseCaches(boolean usecaches) 
 public String toString() 
 public boolean usingProxy()