|
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.CommonsHttpMessageSender
public class CommonsHttpMessageSender
WebServiceMessageSender
implementation that uses Jakarta
Commons HttpClient to execute POST requests.
Credentials
instance (such as the UsernamePasswordCredentials
).
HttpUrlConnectionMessageSender
,
HttpClient
,
setCredentials(Credentials)
Field Summary |
---|
Fields inherited from class org.springframework.ws.transport.http.AbstractHttpWebServiceMessageSender |
---|
logger |
Constructor Summary | |
---|---|
CommonsHttpMessageSender()
Create a new instance of the CommonsHttpMessageSender with a default HttpClient that uses a
default MultiThreadedHttpConnectionManager . |
|
CommonsHttpMessageSender(HttpClient httpClient)
Create a new instance of the CommonsHttpMessageSender with the given HttpClient instance. |
Method Summary | |
---|---|
void |
afterPropertiesSet()
|
WebServiceConnection |
createConnection(URI uri)
Create a new WebServiceConnection to the specified URI. |
void |
destroy()
|
AuthScope |
getAuthScope()
Returns the authentication scope to be used. |
Credentials |
getCredentials()
Returns the credentials to be used. |
HttpClient |
getHttpClient()
Returns the HttpClient used by this message sender. |
void |
setAuthScope(AuthScope authScope)
Sets the authentication scope to be used. |
void |
setConnectionTimeout(int timeout)
Sets the timeout until a connection is etablished. |
void |
setCredentials(Credentials credentials)
Sets the credentials to be used. |
void |
setHttpClient(HttpClient httpClient)
Set the HttpClient used by this message sender. |
void |
setMaxConnectionsPerHost(Properties 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 CommonsHttpMessageSender()
CommonsHttpMessageSender
with a default HttpClient
that uses a
default MultiThreadedHttpConnectionManager
.
public CommonsHttpMessageSender(HttpClient httpClient)
CommonsHttpMessageSender
with the given HttpClient
instance.
httpClient
- the HttpClient instance to use for this senderMethod Detail |
---|
public HttpClient getHttpClient()
HttpClient
used by this message sender.
public void setHttpClient(HttpClient httpClient)
HttpClient
used by this message sender.
public Credentials getCredentials()
public void setCredentials(Credentials credentials)
UsernamePasswordCredentials
,
NTCredentials
public void setConnectionTimeout(int timeout)
timeout
- the timeout value in millisecondsHttpConnectionParams.setConnectionTimeout(int)
public void setReadTimeout(int timeout)
timeout
- the timeout value in millisecondsHttpConnectionParams.setSoTimeout(int)
public void setMaxTotalConnections(int maxTotalConnections)
maxTotalConnections
- the maximum number of connections allowedHttpConnectionManagerParams.setMaxTotalConnections(int)
public void setMaxConnectionsPerHost(Properties maxConnectionsPerHost) throws URIException
java.util.Properties
class, like as follows:
https://www.example.com=1 http://www.example.com:8080=7 www.springframework.org=10 *=5The host can be specified as hostname, or as URI (with scheme and port). The special host name
*
can be
used to specify HostConfiguration.ANY_HOST_CONFIGURATION
.
maxConnectionsPerHost
- a properties object specifying the maximum number of connection
URIException
HttpConnectionManagerParams.setMaxConnectionsPerHost(org.apache.commons.httpclient.HostConfiguration,
int)
public AuthScope getAuthScope()
credentials
property has been set.
By default, the AuthScope.ANY
is returned.
public void setAuthScope(AuthScope authScope)
credentials
property has been set.
By default, the AuthScope.ANY
is used.
setCredentials(Credentials)
public void afterPropertiesSet() throws Exception
afterPropertiesSet
in interface InitializingBean
Exception
public void destroy() throws Exception
destroy
in interface DisposableBean
Exception
public WebServiceConnection createConnection(URI uri) throws IOException
WebServiceMessageSender
WebServiceConnection
to the specified URI.
createConnection
in interface WebServiceMessageSender
uri
- the URI to open a connection to
IOException
- in case of I/O errors
|
Spring Web Services Framework | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |