Proxy is an immutable object.
java.net.ProxySelector
| Modifier and Type | Class and Description |
|---|---|
| public static enum | Proxy.
Represents the proxy type. |
| Modifier and Type | Field and Description |
|---|---|
| public static final Proxy | NO_PROXY
A proxy setting that represents a |
| private final SocketAddress | |
| private final Proxy. |
| Access | Constructor and Description |
|---|---|
| private | |
| public | Proxy(Proxy.
the type,Type of the proxythe sa)SocketAddress for that proxyCreates an entry representing a PROXY connection. |
| Modifier and Type | Method and Description |
|---|---|
| public SocketAddress | Returns: aSocketAddress representing the socket end
point of the proxyReturns the socket address of the proxy, or
|
| public final boolean | Returns: true if the objects are the same;
false otherwise.the object to compare against. obj)Overrides java. Compares this object against the specified object. |
| public final int | Returns: a hash code value for this ProxyOverrides java. Returns a hash code value for this Proxy. |
| public String | Returns: a string representation of this object.Overrides java. Constructs a string representation of this Proxy. |
| public Proxy. |
| NO_PROXY | back to summary |
|---|---|
| public static final Proxy NO_PROXY A proxy setting that represents a
| |
| sa | back to summary |
|---|---|
| private final SocketAddress sa | |
| type | back to summary |
|---|---|
| private final Proxy. | |
| Proxy | back to summary |
|---|---|
| private Proxy() | |
| Proxy | back to summary |
|---|---|
| public Proxy(Proxy. Creates an entry representing a PROXY connection. Certain combinations are illegal. For instance, for types Http, and Socks, a SocketAddress must be provided.
Use the
| |
| address | back to summary |
|---|---|
| public SocketAddress address() Returns the socket address of the proxy, or
| |
| equals | back to summary |
|---|---|
| public final boolean equals(Object obj) Overrides java. Compares this object against the specified object.
The result is
Two instances of
| |
| hashCode | back to summary |
|---|---|
| public final int hashCode() Overrides java. Returns a hash code value for this Proxy.
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Constructs a string representation of this Proxy.
This String is constructed by calling toString() on its type
and concatenating " @ " and the toString() result from its address
if its type is not
| |
| type | back to summary |
|---|---|
| public Proxy. Returns the proxy type. | |
| Modifier and Type | Field and Description |
|---|---|
| public static final Proxy. | DIRECT
Represents a direct connection, or the absence of a proxy. |
| public static final Proxy. | HTTP
Represents proxy for high level protocols such as HTTP or FTP. |
| public static final Proxy. | SOCKS
Represents a SOCKS (V4 or V5) proxy. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static Proxy. | |
| public static Proxy. |
| DIRECT | back to summary |
|---|---|
| public static final Proxy. Represents a direct connection, or the absence of a proxy. | |
| HTTP | back to summary |
|---|---|
| public static final Proxy. Represents proxy for high level protocols such as HTTP or FTP. | |
| SOCKS | back to summary |
|---|---|
| public static final Proxy. Represents a SOCKS (V4 or V5) proxy. | |
| Type | back to summary |
|---|---|
| private Type() | |
| valueOf | back to summary |
|---|---|
| public static Proxy. | |
| values | back to summary |
|---|---|
| public static Proxy. | |