| java.lang.Object org.apache.harmony.rmi.transport.proxy.Proxy
Proxy | final public class Proxy implements ProxyConstants(Code) | | Provides access to Java proxy system properties.
Note: instances of this class and values returned by their methods
should not be stored longer than is required to establish a particular
connection. Instead, a new instance should be created and the methods
of that instance called each time new connection is established.
author: Vasily Zakharov version: $Revision: 1.1.2.2 $ |
Constructor Summary | |
public | Proxy() Creates instance of this class.
Note: instances of this class and values returned by their methods
should not be stored longer than is required to establish a particular
connection. |
Method Summary | |
public String | getHost() Returns proxy host name or null if proxy host is not set. | public int | getPort() Returns proxy port number or
Proxy.HTTP_DEFAULT_PORT if proxy port
is not set or -1 if proxy host is not set. | public Socket | getSocket(String host, int port) Returns new socket connected to specified host and port, probably
through a proxy (if proxy is set). | public boolean | isSet() Returns true if proxy host is set in system environment,
false otherwise. |
Proxy | public Proxy()(Code) | | Creates instance of this class.
Note: instances of this class and values returned by their methods
should not be stored longer than is required to establish a particular
connection. Instead, a new instance should be created and the methods
of that instance called each time new connection is established.
|
getHost | public String getHost()(Code) | | Returns proxy host name or null if proxy host is not set.
Proxy host name or null if proxy host is not set. |
getSocket | public Socket getSocket(String host, int port) throws IOException(Code) | | Returns new socket connected to specified host and port, probably
through a proxy (if proxy is set). If proxy is not set, then if direct
HTTP connections are enabled, connection is established directly,
otherwise
IOException is thrown.
Parameters: host - Host to connect to.z Parameters: port - Port to connect to. New socket connected to the specified host and port,probably through a proxy. throws: IOException - If I/O error occurs. |
isSet | public boolean isSet()(Code) | | Returns true if proxy host is set in system environment,
false otherwise.
true if proxy host is set in system environment,false otherwise. |
|
|