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
ConstructorsConstructorDescriptionDeprecated.Create a new instance of theCommonsHttpMessageSenderwith a defaultHttpClientthat uses a defaultMultiThreadedHttpConnectionManager.CommonsHttpMessageSender(org.apache.commons.httpclient.HttpClient httpClient) Deprecated.Create a new instance of theCommonsHttpMessageSenderwith the givenHttpClientinstance. -
Method Summary
Modifier and TypeMethodDescriptionvoidDeprecated.createConnection(URI uri) Deprecated.Create a newWebServiceConnectionto the specified URI.voiddestroy()Deprecated.org.apache.commons.httpclient.auth.AuthScopeDeprecated.Returns the authentication scope to be used.org.apache.commons.httpclient.CredentialsDeprecated.Returns the credentials to be used.org.apache.commons.httpclient.HttpClientDeprecated.Returns theHttpClientused by this message sender.voidsetAuthScope(org.apache.commons.httpclient.auth.AuthScope authScope) Deprecated.Sets the authentication scope to be used.voidsetConnectionTimeout(int timeout) Deprecated.Sets the timeout until a connection is etablished.voidsetCredentials(org.apache.commons.httpclient.Credentials credentials) Deprecated.Sets the credentials to be used.voidsetHttpClient(org.apache.commons.httpclient.HttpClient httpClient) Deprecated.Set theHttpClientused by this message sender.voidsetMaxConnectionsPerHost(Map<String, String> maxConnectionsPerHost) Deprecated.Sets the maximum number of connections per host for the underlying HttpClient.voidsetMaxTotalConnections(int maxTotalConnections) Deprecated.Sets the maximum number of connections allowed for the underlying HttpClient.voidsetReadTimeout(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 theCommonsHttpMessageSenderwith a defaultHttpClientthat uses a defaultMultiThreadedHttpConnectionManager. -
CommonsHttpMessageSender
public CommonsHttpMessageSender(org.apache.commons.httpclient.HttpClient httpClient) Deprecated.Create a new instance of theCommonsHttpMessageSenderwith the givenHttpClientinstance.- Parameters:
httpClient- the HttpClient instance to use for this sender
-
-
Method Details
-
getHttpClient
public org.apache.commons.httpclient.HttpClient getHttpClient()Deprecated.Returns theHttpClientused by this message sender. -
setHttpClient
public void setHttpClient(org.apache.commons.httpclient.HttpClient httpClient) Deprecated.Set theHttpClientused 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:
-
UsernamePasswordCredentialsNTCredentials
-
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.Propertiesclass, 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 thecredentialsproperty has been set.By default, the
AuthScope.ANYis returned. -
setAuthScope
public void setAuthScope(org.apache.commons.httpclient.auth.AuthScope authScope) Deprecated.Sets the authentication scope to be used. Only used when thecredentialsproperty has been set.By default, the
AuthScope.ANYis used.- See Also:
-
afterPropertiesSet
Deprecated.- Specified by:
afterPropertiesSetin interfaceorg.springframework.beans.factory.InitializingBean- Throws:
Exception
-
destroy
Deprecated.- Specified by:
destroyin interfaceorg.springframework.beans.factory.DisposableBean- Throws:
Exception
-
createConnection
Deprecated.Description copied from interface:WebServiceMessageSenderCreate a newWebServiceConnectionto the specified URI.- Specified by:
createConnectionin interfaceWebServiceMessageSender- Parameters:
uri- the URI to open a connection to- Returns:
- the new connection
- Throws:
IOException- in case of I/O errors
-
HttpComponentsMessageSender