|
Spring Web Services Framework | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.springframework.ws.transport.http.AbstractHttpWebServiceMessageSender
org.springframework.ws.transport.http.HttpComponentsMessageSender
public class HttpComponentsMessageSender
WebServiceMessageSender implementation that uses Apache
HttpClient to execute POST requests.
Credentials instance (such as the UsernamePasswordCredentials).
HttpClient| Nested Class Summary | |
|---|---|
static class |
HttpComponentsMessageSender.RemoveSoapHeadersInterceptor
HttpClient HttpRequestInterceptor implementation that removes Content-Length and
Transfer-Encoding headers from the request. |
| Field Summary |
|---|
| Fields inherited from class org.springframework.ws.transport.http.AbstractHttpWebServiceMessageSender |
|---|
logger |
| Constructor Summary | |
|---|---|
HttpComponentsMessageSender()
Create a new instance of the HttpClientMessageSender with a default HttpClient that uses a
default PoolingClientConnectionManager. |
|
HttpComponentsMessageSender(org.apache.http.client.HttpClient httpClient)
Create a new instance of the HttpClientMessageSender with the given
HttpClient instance. |
|
| Method Summary | |
|---|---|
void |
afterPropertiesSet()
|
WebServiceConnection |
createConnection(URI uri)
Create a new WebServiceConnection to the specified URI. |
protected org.apache.http.protocol.HttpContext |
createContext(URI uri)
Template method that allows for creation of a HttpContext for the given uri. |
void |
destroy()
|
org.apache.http.client.HttpClient |
getHttpClient()
Returns the HttpClient used by this message sender. |
void |
setAuthScope(org.apache.http.auth.AuthScope authScope)
Sets the authentication scope to be used. |
void |
setConnectionTimeout(int timeout)
Sets the timeout until a connection is established. |
void |
setCredentials(org.apache.http.auth.Credentials credentials)
Sets the credentials to be used. |
void |
setHttpClient(org.apache.http.client.HttpClient httpClient)
Set the HttpClient used by this message sender. |
void |
setMaxConnectionsPerHost(Map<String,String> maxConnectionsPerHost)
Sets the maximum number of connections per host for the underlying HttpClient. |
void |
setMaxTotalConnections(int maxTotalConnections)
Sets the maximum number of connections allowed for the underlying HttpClient. |
void |
setReadTimeout(int timeout)
Set the socket read timeout for the underlying HttpClient. |
| Methods inherited from class org.springframework.ws.transport.http.AbstractHttpWebServiceMessageSender |
|---|
isAcceptGzipEncoding, setAcceptGzipEncoding, supports |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public HttpComponentsMessageSender()
HttpClientMessageSender with a default HttpClient that uses a
default PoolingClientConnectionManager.
public HttpComponentsMessageSender(org.apache.http.client.HttpClient httpClient)
HttpClientMessageSender with the given
HttpClient instance.
This constructor does not change the given HttpClient in any way. As such,
it does not set timeouts, nor does it
add
the HttpComponentsMessageSender.RemoveSoapHeadersInterceptor.
httpClient - the HttpClient instance to use for this sender| Method Detail |
|---|
public void setCredentials(org.apache.http.auth.Credentials credentials)
UsernamePasswordCredentials,
NTCredentialspublic org.apache.http.client.HttpClient getHttpClient()
HttpClient used by this message sender.
public void setHttpClient(org.apache.http.client.HttpClient httpClient)
HttpClient used by this message sender.
public void setConnectionTimeout(int timeout)
timeout - the timeout value in millisecondsHttpConnectionParams.setConnectionTimeout(org.apache.http.params.HttpParams, int)public void setReadTimeout(int timeout)
timeout - the timeout value in millisecondsHttpConnectionParams.setSoTimeout(org.apache.http.params.HttpParams, int)public void setMaxTotalConnections(int maxTotalConnections)
maxTotalConnections - the maximum number of connections allowedPoolingClientConnectionManager.setMaxTotal(int)
public void setMaxConnectionsPerHost(Map<String,String> maxConnectionsPerHost)
throws URISyntaxException
java.util.Properties class, like as follows:
https://www.example.com=1 http://www.example.com:8080=7 http://www.springframework.org=10The host can be specified as a URI (with scheme and port).
maxConnectionsPerHost - a properties object specifying the maximum number of connection
URISyntaxExceptionPoolingClientConnectionManager.setMaxPerRoute(HttpRoute, int)public void setAuthScope(org.apache.http.auth.AuthScope authScope)
credentials property has been set.
By default, the AuthScope.ANY is used.
setCredentials(Credentials)
public void afterPropertiesSet()
throws Exception
afterPropertiesSet in interface InitializingBeanException
public WebServiceConnection createConnection(URI uri)
throws IOException
WebServiceMessageSenderWebServiceConnection to the specified URI.
createConnection in interface WebServiceMessageSenderuri - the URI to open a connection to
IOException - in case of I/O errorsprotected org.apache.http.protocol.HttpContext createContext(URI uri)
HttpContext for the given uri. Default implementation
returns null.
uri - the URI to create the context for
null
public void destroy()
throws Exception
destroy in interface DisposableBeanException
|
Spring Web Services Framework | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||