public class HttpsUrlConnectionMessageSender extends HttpUrlConnectionMessageSender implements org.springframework.beans.factory.InitializingBean
HttpUrlConnectionMessageSender that adds support for (self-signed) HTTPS certificates.| Modifier and Type | Field and Description |
|---|---|
static String |
DEFAULT_SSL_PROTOCOL
The default SSL protocol.
|
logger| Constructor and Description |
|---|
HttpsUrlConnectionMessageSender() |
| Modifier and Type | Method and Description |
|---|---|
void |
afterPropertiesSet() |
protected void |
prepareConnection(HttpURLConnection connection)
Template method for preparing the given
HttpURLConnection. |
void |
setHostnameVerifier(HostnameVerifier hostnameVerifier)
Specifies the host name verifier to use for this message sender.
|
void |
setKeyManagers(KeyManager[] keyManagers)
Specifies the key managers to use for this message sender.
|
void |
setSecureRandom(SecureRandom rnd)
Specifies the secure random to use for this message sender.
|
void |
setSslProtocol(String sslProtocol)
Sets the SSL protocol to use.
|
void |
setSslProvider(String sslProvider)
Sets the SSL provider to use.
|
void |
setSslSocketFactory(SSLSocketFactory sslSocketFactory)
Specifies the SSLSocketFactory to use for this message sender.
|
void |
setTrustManagers(TrustManager[] trustManagers)
Specifies the trust managers to use for this message sender.
|
createConnectionisAcceptGzipEncoding, setAcceptGzipEncoding, supportspublic static final String DEFAULT_SSL_PROTOCOL
public void setSslProtocol(String sslProtocol)
ssl.SSLContext.getInstance(String, String)public void setSslProvider(String sslProvider)
SSLContext.getInstance(String, String)public void setKeyManagers(KeyManager[] keyManagers)
Setting either this property or trustManagers is required.
public void setTrustManagers(TrustManager[] trustManagers)
Setting either this property or keyManagers is required.
public void setHostnameVerifier(HostnameVerifier hostnameVerifier)
public void setSecureRandom(SecureRandom rnd)
public void setSslSocketFactory(SSLSocketFactory sslSocketFactory)
public void afterPropertiesSet()
throws Exception
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBeanExceptionprotected void prepareConnection(HttpURLConnection connection) throws IOException
HttpUrlConnectionMessageSenderHttpURLConnection.
The default implementation prepares the connection for input and output, sets the HTTP method to POST, disables
caching, and sets the Accept-Encoding header to gzip, if applicable.
prepareConnection in class HttpUrlConnectionMessageSenderconnection - the connection to prepareIOException - in case of I/O errors