| Prev Class | Next Class | Frames | No Frames |
| Summary: Nested | Field | Method | Constr | Detail: Nested | Field | Method | Constr |
java.lang.Objectorg.apache.commons.httpclient.ProxyClientpublic class ProxyClientextends java.lang.Objectsockets 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- Theparametersto 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 configurationprior to calling this method.
- Returns:
- the connect response
- Throws:
HttpException-
- See Also:
getHostConfiguration()
public HostConfiguration getHostConfiguration()
Returns thehost configurationassociated with the ProxyClient.
- Returns:
host configuration
public HttpClientParams getParams()
ReturnsHTTP protocol parametersassociated with this ProxyClient.
- See Also:
HttpClientParams
public HttpState getState()
ReturnsHTTP stateassociated with the ProxyClient.
- Returns:
- the shared client state
- See Also:
setState(HttpState)
public void setHostConfiguration(HostConfiguration hostConfiguration)
Assigns thehost configurationto use with the ProxyClient.
- Parameters:
hostConfiguration- Thehost configurationto set
public void setParams(HttpClientParams params)
AssignsHTTP protocol parametersfor this ProxyClient.
- See Also:
HttpClientParams
public void setState(HttpState state)
AssignsHTTP statefor the ProxyClient.
- Parameters:
state- the newHTTP statefor the client
- See Also:
getState()