Public Member Functions | Protected Member Functions | Protected Attributes

sun.net.www.protocol.http.Handler Class Reference

Inheritance diagram for sun.net.www.protocol.http.Handler:
java.net.URLStreamHandler

List of all members.

Public Member Functions

 Handler ()
 Handler (String proxy, int port)

Protected Member Functions

int getDefaultPort ()
java.net.URLConnection openConnection (URL u) throws IOException
java.net.URLConnection openConnection (URL u, Proxy p) throws IOException

Protected Attributes

String proxy
int proxyPort

Detailed Description

open an http input stream given a URL

Definition at line 37 of file sun/net/www/protocol/http/Handler.java.


Constructor & Destructor Documentation

sun.net.www.protocol.http.Handler.Handler (  ) 

Definition at line 45 of file sun/net/www/protocol/http/Handler.java.

sun.net.www.protocol.http.Handler.Handler ( String  proxy,
int  port 
)

Definition at line 50 of file sun/net/www/protocol/http/Handler.java.


Member Function Documentation

int sun.net.www.protocol.http.Handler.getDefaultPort (  )  [protected]

Returns the default port for a URL parsed by this handler. This method is meant to be overidden by handlers with default port numbers.

Returns:
the default port for a URL parsed by this handler.
Since:
1.3

Reimplemented from java.net.URLStreamHandler.

Definition at line 41 of file sun/net/www/protocol/http/Handler.java.

java.net.URLConnection sun.net.www.protocol.http.Handler.openConnection ( URL  u,
Proxy  p 
) throws IOException [protected]

Same as openConnection(URL), except that the connection will be made through the specified proxy; Protocol handlers that do not support proxying will ignore the proxy parameter and make a normal connection.

Calling this method preempts the system's default ProxySelector settings.

Parameters:
u the URL that this connects to.
p the proxy through which the connection will be made. If direct connection is desired, Proxy.NO_PROXY should be specified.
Returns:
a URLConnection object for the URL.
Exceptions:
IOException if an I/O error occurs while opening the connection.
IllegalArgumentException if either u or p is null, or p has the wrong type.
UnsupportedOperationException if the subclass that implements the protocol doesn't support this method.
Since:
1.5

Reimplemented from java.net.URLStreamHandler.

Definition at line 60 of file sun/net/www/protocol/http/Handler.java.

java.net.URLConnection sun.net.www.protocol.http.Handler.openConnection ( URL  u  )  throws IOException [protected, virtual]

Opens a connection to the object referenced by the URL argument. This method should be overridden by a subclass.

If for the handler's protocol (such as HTTP or JAR), there exists a public, specialized URLConnection subclass belonging to one of the following packages or one of their subpackages: java.lang, java.io, java.util, java.net, the connection returned will be of that subclass. For example, for HTTP an HttpURLConnection will be returned, and for JAR a JarURLConnection will be returned.

Parameters:
u the URL that this connects to.
Returns:
a URLConnection object for the URL.
Exceptions:
IOException if an I/O error occurs while opening the connection.

Implements java.net.URLStreamHandler.

Definition at line 55 of file sun/net/www/protocol/http/Handler.java.


Member Data Documentation


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Enumerations

lowtiyel