Package org.apache.commons.httpclient
Class ProxyClient
- java.lang.Object
-
- org.apache.commons.httpclient.ProxyClient
-
@Deprecated public class ProxyClient extends java.lang.ObjectDeprecated.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 providessocketsfor 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 classProxyClient.ConnectResponseDeprecated.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.ConnectResponseconnect()Deprecated.Creates a socket that is connected, via the HTTP CONNECT method, to a proxy.HostConfigurationgetHostConfiguration()Deprecated.Returns thehost configurationassociated with the ProxyClient.HttpClientParamsgetParams()Deprecated.ReturnsHTTP protocol parametersassociated with this ProxyClient.HttpStategetState()Deprecated.ReturnsHTTP stateassociated with the ProxyClient.voidsetHostConfiguration(HostConfiguration hostConfiguration)Deprecated.Assigns thehost configurationto use with the ProxyClient.voidsetParams(HttpClientParams params)Deprecated.AssignsHTTP protocol parametersfor this ProxyClient.voidsetState(HttpState state)Deprecated.AssignsHTTP statefor 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- Theparametersto use.- See Also:
HttpClientParams
-
-
Method Detail
-
getState
public HttpState getState()
Deprecated.ReturnsHTTP stateassociated with the ProxyClient.- Returns:
- the shared client state
- See Also:
setState(HttpState)
-
setState
public void setState(HttpState state)
Deprecated.AssignsHTTP statefor the ProxyClient.- Parameters:
state- the newHTTP statefor the client- See Also:
getState()
-
getHostConfiguration
public HostConfiguration getHostConfiguration()
Deprecated.Returns thehost configurationassociated with the ProxyClient.- Returns:
host configuration
-
setHostConfiguration
public void setHostConfiguration(HostConfiguration hostConfiguration)
Deprecated.Assigns thehost configurationto use with the ProxyClient.- Parameters:
hostConfiguration- Thehost configurationto set
-
getParams
public HttpClientParams getParams()
Deprecated.ReturnsHTTP protocol parametersassociated with this ProxyClient.- See Also:
HttpClientParams
-
setParams
public void setParams(HttpClientParams params)
Deprecated.AssignsHTTP protocol parametersfor 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 configurationprior to calling this method.- Returns:
- the connect response
- Throws:
java.io.IOExceptionHttpException- See Also:
getHostConfiguration()
-
-