| java.lang.Object | |
| ↳ | java.net.Proxy |
This class is about proxy setting. A proxy contains type,
proxy host address information. There are three types of Proxy:
Proxy instance is immutable.
| Nested Classes | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Proxy.Type | The proxy type, includes DIRECT, HTTP and
SOCKS. |
||||||||||
| Constants | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Proxy | NO_PROXY | Represents Proxy.Type.DIRECT type proxy setting. |
|||||||||
| Public Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
New a
Proxy instance. | |||||||||||
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Gets the proxy address.
| |||||||||||
Compare | |||||||||||
gets the hash code of
Proxy. | |||||||||||
Representing string of the proxy. | |||||||||||
Gets the proxy type.
| |||||||||||
|
[Expand]
Inherited Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class java.lang.Object
| |||||||||||
Represents Proxy.Type.DIRECT type proxy setting. It tells
protocol handlers not to use any proxy.
New a Proxy instance. SocketAddress must NOT be null when
type is either Proxy.Type.HTTP or
Proxy.Type.SOCKS. For Proxy.Type.DIRECT
type proxy, use Proxy.NO_PROXY directly instead of
constructing it.
| type | proxy type |
|---|---|
| sa | proxy address |
| IllegalArgumentException | when type is Proxy.Type.DIRECT
or SocketAddress is null.
|
|---|
Gets the proxy address.
HTTP and SOCKS
type proxy. Returns null for DIRECT type proxy.
Compare obj with current proxy. Returns false if the
obj is not a Proxy object. Returns true if
and only if the obj has the same address
and type value as current proxy.
| obj | Object the object to compare with this object. |
|---|
obj represents the same proxy. Otherwise,
returns false.
Representing string of the proxy. The string consists of
type.toString() and address.toString() if
type and address are not null.
Gets the proxy type.