Class ProxyClient
java.lang.Object
edu.internet2.middleware.grouperClientExt.org.apache.commons.httpclient.ProxyClient
A client that provides
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.- Since:
- 3.0
- Version:
- $Revision: 480424 $
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Contains the method used to execute the connect along with the created socket. -
Constructor Summary
ConstructorDescriptionCreates an instance of ProxyClient using defaultparameter set
.ProxyClient
(HttpClientParams params) Creates an instance of ProxyClient using the givenparameter set
. -
Method Summary
Modifier and TypeMethodDescriptionconnect()
Creates a socket that is connected, via the HTTP CONNECT method, to a proxy.Returns thehost configuration
associated with the ProxyClient.ReturnsHTTP protocol parameters
associated with this ProxyClient.getState()
ReturnsHTTP state
associated with the ProxyClient.void
setHostConfiguration
(HostConfiguration hostConfiguration) Assigns thehost configuration
to use with the ProxyClient.void
setParams
(HttpClientParams params) AssignsHTTP protocol parameters
for this ProxyClient.void
AssignsHTTP state
for the ProxyClient.
-
Constructor Details
-
ProxyClient
public ProxyClient()Creates an instance of ProxyClient using defaultparameter set
.- See Also:
-
ProxyClient
Creates an instance of ProxyClient using the givenparameter set
.- Parameters:
params
- Theparameters
to use.- See Also:
-
-
Method Details
-
getState
ReturnsHTTP state
associated with the ProxyClient.- Returns:
- the shared client state
- See Also:
-
setState
AssignsHTTP state
for the ProxyClient.- Parameters:
state
- the newHTTP state
for the client- See Also:
-
getHostConfiguration
Returns thehost configuration
associated with the ProxyClient.- Returns:
host configuration
-
setHostConfiguration
Assigns thehost configuration
to use with the ProxyClient.- Parameters:
hostConfiguration
- Thehost configuration
to set
-
getParams
ReturnsHTTP protocol parameters
associated with this ProxyClient.- See Also:
-
setParams
AssignsHTTP protocol parameters
for this ProxyClient.- See Also:
-
connect
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:
IOException
HttpException
- See Also:
-