Class CommonsHttpMessageSender
java.lang.Object
org.springframework.ws.transport.http.AbstractHttpWebServiceMessageSender
org.springframework.ws.transport.http.CommonsHttpMessageSender
- All Implemented Interfaces:
org.springframework.beans.factory.DisposableBean
,org.springframework.beans.factory.InitializingBean
,WebServiceMessageSender
@Deprecated
public class CommonsHttpMessageSender
extends AbstractHttpWebServiceMessageSender
implements org.springframework.beans.factory.InitializingBean, org.springframework.beans.factory.DisposableBean
Deprecated.
WebServiceMessageSender
implementation that uses
Jakarta Commons HttpClient to execute POST requests.
Allows to use a preconfigured HttpClient instance, potentially with authentication, HTTP connection pooling, etc.
Authentication can also be set by injecting a Credentials
instance (such as the
UsernamePasswordCredentials
).
- Since:
- 1.0.0
- Author:
- Arjen Poutsma
- See Also:
-
Field Summary
Fields inherited from class org.springframework.ws.transport.http.AbstractHttpWebServiceMessageSender
logger
-
Constructor Summary
ConstructorDescriptionDeprecated.Create a new instance of theCommonsHttpMessageSender
with a defaultHttpClient
that uses a defaultMultiThreadedHttpConnectionManager
.CommonsHttpMessageSender
(org.apache.commons.httpclient.HttpClient httpClient) Deprecated.Create a new instance of theCommonsHttpMessageSender
with the givenHttpClient
instance. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Deprecated.createConnection
(URI uri) Deprecated.Create a newWebServiceConnection
to the specified URI.void
destroy()
Deprecated.org.apache.commons.httpclient.auth.AuthScope
Deprecated.Returns the authentication scope to be used.org.apache.commons.httpclient.Credentials
Deprecated.Returns the credentials to be used.org.apache.commons.httpclient.HttpClient
Deprecated.Returns theHttpClient
used by this message sender.void
setAuthScope
(org.apache.commons.httpclient.auth.AuthScope authScope) Deprecated.Sets the authentication scope to be used.void
setConnectionTimeout
(int timeout) Deprecated.Sets the timeout until a connection is etablished.void
setCredentials
(org.apache.commons.httpclient.Credentials credentials) Deprecated.Sets the credentials to be used.void
setHttpClient
(org.apache.commons.httpclient.HttpClient httpClient) Deprecated.Set theHttpClient
used by this message sender.void
setMaxConnectionsPerHost
(Map<String, String> maxConnectionsPerHost) Deprecated.Sets the maximum number of connections per host for the underlying HttpClient.void
setMaxTotalConnections
(int maxTotalConnections) Deprecated.Sets the maximum number of connections allowed for the underlying HttpClient.void
setReadTimeout
(int timeout) Deprecated.Set the socket read timeout for the underlying HttpClient.Methods inherited from class org.springframework.ws.transport.http.AbstractHttpWebServiceMessageSender
isAcceptGzipEncoding, setAcceptGzipEncoding, supports
-
Constructor Details
-
CommonsHttpMessageSender
public CommonsHttpMessageSender()Deprecated.Create a new instance of theCommonsHttpMessageSender
with a defaultHttpClient
that uses a defaultMultiThreadedHttpConnectionManager
. -
CommonsHttpMessageSender
public CommonsHttpMessageSender(org.apache.commons.httpclient.HttpClient httpClient) Deprecated.Create a new instance of theCommonsHttpMessageSender
with the givenHttpClient
instance.- Parameters:
httpClient
- the HttpClient instance to use for this sender
-
-
Method Details
-
getHttpClient
public org.apache.commons.httpclient.HttpClient getHttpClient()Deprecated.Returns theHttpClient
used by this message sender. -
setHttpClient
public void setHttpClient(org.apache.commons.httpclient.HttpClient httpClient) Deprecated.Set theHttpClient
used by this message sender. -
getCredentials
public org.apache.commons.httpclient.Credentials getCredentials()Deprecated.Returns the credentials to be used. -
setCredentials
public void setCredentials(org.apache.commons.httpclient.Credentials credentials) Deprecated.Sets the credentials to be used. If not set, no authentication is done.- See Also:
-
UsernamePasswordCredentials
NTCredentials
-
setConnectionTimeout
public void setConnectionTimeout(int timeout) Deprecated.Sets the timeout until a connection is etablished. A value of 0 means never timeout.- Parameters:
timeout
- the timeout value in milliseconds- See Also:
-
HttpConnectionParams.setConnectionTimeout(int)
-
setReadTimeout
public void setReadTimeout(int timeout) Deprecated.Set the socket read timeout for the underlying HttpClient. A value of 0 means never timeout.- Parameters:
timeout
- the timeout value in milliseconds- See Also:
-
HttpConnectionParams.setSoTimeout(int)
-
setMaxTotalConnections
public void setMaxTotalConnections(int maxTotalConnections) Deprecated.Sets the maximum number of connections allowed for the underlying HttpClient.- Parameters:
maxTotalConnections
- the maximum number of connections allowed- See Also:
-
HttpConnectionManagerParams.setMaxTotalConnections(int)
-
setMaxConnectionsPerHost
public void setMaxConnectionsPerHost(Map<String, String> maxConnectionsPerHost) throws org.apache.commons.httpclient.URIExceptionDeprecated.Sets the maximum number of connections per host for the underlying HttpClient. The maximum number of connections per host can be set in a form accepted by thejava.util.Properties
class, like as follows:https://www.example.com=1 http://www.example.com:8080=7 www.springframework.org=10 *=5
The host can be specified as hostname, or as URI (with scheme and port). The special host name*
can be used to specifyHostConfiguration.ANY_HOST_CONFIGURATION
.- Parameters:
maxConnectionsPerHost
- a properties object specifying the maximum number of connection- Throws:
org.apache.commons.httpclient.URIException
- See Also:
-
HttpConnectionManagerParams.setMaxConnectionsPerHost(org.apache.commons.httpclient.HostConfiguration, int)
-
getAuthScope
public org.apache.commons.httpclient.auth.AuthScope getAuthScope()Deprecated.Returns the authentication scope to be used. Only used when thecredentials
property has been set.By default, the
AuthScope.ANY
is returned. -
setAuthScope
public void setAuthScope(org.apache.commons.httpclient.auth.AuthScope authScope) Deprecated.Sets the authentication scope to be used. Only used when thecredentials
property has been set.By default, the
AuthScope.ANY
is used.- See Also:
-
afterPropertiesSet
Deprecated.- Specified by:
afterPropertiesSet
in interfaceorg.springframework.beans.factory.InitializingBean
- Throws:
Exception
-
destroy
Deprecated.- Specified by:
destroy
in interfaceorg.springframework.beans.factory.DisposableBean
- Throws:
Exception
-
createConnection
Deprecated.Description copied from interface:WebServiceMessageSender
Create a newWebServiceConnection
to the specified URI.- Specified by:
createConnection
in interfaceWebServiceMessageSender
- Parameters:
uri
- the URI to open a connection to- Returns:
- the new connection
- Throws:
IOException
- in case of I/O errors
-
HttpComponentsMessageSender