Package org.apache.commons.httpclient
Class ProxyClient
- java.lang.Object
-
- org.apache.commons.httpclient.ProxyClient
-
@Deprecated public class ProxyClient extends java.lang.Object
Deprecated.Jakarta Commons HttpClient 3.x is deprecated in the Jenkins project. It is not recommended to use it in any new code. Instead, use HTTP client API plugins as a dependency in your code. E.g. Apache HttpComponents Client API 4.x Plugin or Async HTTP Client Plugin.A client that providessockets
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.- Since:
- 3.0
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ProxyClient.ConnectResponse
Deprecated.Contains the method used to execute the connect along with the created socket.
-
Constructor Summary
Constructors Constructor Description ProxyClient()
Deprecated.Creates an instance of ProxyClient using defaultparameter set
.ProxyClient(HttpClientParams params)
Deprecated.Creates an instance of ProxyClient using the givenparameter set
.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description ProxyClient.ConnectResponse
connect()
Deprecated.Creates a socket that is connected, via the HTTP CONNECT method, to a proxy.HostConfiguration
getHostConfiguration()
Deprecated.Returns thehost configuration
associated with the ProxyClient.HttpClientParams
getParams()
Deprecated.ReturnsHTTP protocol parameters
associated with this ProxyClient.HttpState
getState()
Deprecated.ReturnsHTTP state
associated with the ProxyClient.void
setHostConfiguration(HostConfiguration hostConfiguration)
Deprecated.Assigns thehost configuration
to use with the ProxyClient.void
setParams(HttpClientParams params)
Deprecated.AssignsHTTP protocol parameters
for this ProxyClient.void
setState(HttpState state)
Deprecated.AssignsHTTP state
for the ProxyClient.
-
-
-
Constructor Detail
-
ProxyClient
public ProxyClient()
Deprecated.Creates an instance of ProxyClient using defaultparameter set
.- See Also:
HttpClientParams
-
ProxyClient
public ProxyClient(HttpClientParams params)
Deprecated.Creates an instance of ProxyClient using the givenparameter set
.- Parameters:
params
- Theparameters
to use.- See Also:
HttpClientParams
-
-
Method Detail
-
getState
public HttpState getState()
Deprecated.ReturnsHTTP state
associated with the ProxyClient.- Returns:
- the shared client state
- See Also:
setState(HttpState)
-
setState
public void setState(HttpState state)
Deprecated.AssignsHTTP state
for the ProxyClient.- Parameters:
state
- the newHTTP state
for the client- See Also:
getState()
-
getHostConfiguration
public HostConfiguration getHostConfiguration()
Deprecated.Returns thehost configuration
associated with the ProxyClient.- Returns:
host configuration
-
setHostConfiguration
public void setHostConfiguration(HostConfiguration hostConfiguration)
Deprecated.Assigns thehost configuration
to use with the ProxyClient.- Parameters:
hostConfiguration
- Thehost configuration
to set
-
getParams
public HttpClientParams getParams()
Deprecated.ReturnsHTTP protocol parameters
associated with this ProxyClient.- See Also:
HttpClientParams
-
setParams
public void setParams(HttpClientParams params)
Deprecated.AssignsHTTP protocol parameters
for this ProxyClient.- See Also:
HttpClientParams
-
connect
public ProxyClient.ConnectResponse connect() throws java.io.IOException, HttpException
Deprecated.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 the
host configuration
prior to calling this method.- Returns:
- the connect response
- Throws:
java.io.IOException
HttpException
- See Also:
getHostConfiguration()
-
-