Prev Class | Next Class | Frames | No Frames |
Summary: Nested | Field | Method | Constr | Detail: Nested | Field | Method | Constr |
java.lang.Object
org.apache.commons.httpclient.ProxyClient
public class ProxyClient
extends java.lang.Object
sockets
for communicating through HTTP proxies
via the HTTP CONNECT method. This is primarily needed for non-HTTP protocols that wish to
communicate via an HTTP proxy.
Nested Class Summary | |
static class |
|
Constructor Summary | |
| |
|
Method Summary | |
ProxyClient.ConnectResponse |
|
HostConfiguration |
|
HttpClientParams |
|
HttpState |
|
void |
|
void |
|
void |
|
public ProxyClient()
Creates an instance of ProxyClient using defaultparameter set
.
- See Also:
HttpClientParams
public ProxyClient(HttpClientParams params)
Creates an instance of ProxyClient using the givenparameter set
.
- Parameters:
params
- Theparameters
to use.
- See Also:
HttpClientParams
public ProxyClient.ConnectResponse connect() throws IOException, HttpException
Creates a socket that is connected, via the HTTP CONNECT method, to a proxy. Even though HTTP CONNECT proxying is generally used for HTTPS tunneling, the returned socket will not have been wrapped in an SSL socket. Both the proxy and destination hosts must be set via thehost configuration
prior to calling this method.
- Returns:
- the connect response
- Throws:
HttpException
-
- See Also:
getHostConfiguration()
public HostConfiguration getHostConfiguration()
Returns thehost configuration
associated with the ProxyClient.
- Returns:
host configuration
public HttpClientParams getParams()
ReturnsHTTP protocol parameters
associated with this ProxyClient.
- See Also:
HttpClientParams
public HttpState getState()
ReturnsHTTP state
associated with the ProxyClient.
- Returns:
- the shared client state
- See Also:
setState(HttpState)
public void setHostConfiguration(HostConfiguration hostConfiguration)
Assigns thehost configuration
to use with the ProxyClient.
- Parameters:
hostConfiguration
- Thehost configuration
to set
public void setParams(HttpClientParams params)
AssignsHTTP protocol parameters
for this ProxyClient.
- See Also:
HttpClientParams
public void setState(HttpState state)
AssignsHTTP state
for the ProxyClient.
- Parameters:
state
- the newHTTP state
for the client
- See Also:
getState()