Spring Integration

org.springframework.integration.ip.tcp.connection.support
Class DefaultTcpSSLContextSupport

java.lang.Object
  extended by org.springframework.integration.ip.tcp.connection.support.DefaultTcpSSLContextSupport
All Implemented Interfaces:
TcpSSLContextSupport

public class DefaultTcpSSLContextSupport
extends java.lang.Object
implements TcpSSLContextSupport

Default implementation of TcpSSLContextSupport; uses a 'TLS' (by default) SSLContext, initialized with 'JKS' keystores, managed by 'SunX509' Key and Trust managers.

Since:
2.1
Author:
Gary Russell

Constructor Summary
DefaultTcpSSLContextSupport(java.lang.String keyStore, java.lang.String trustStore, java.lang.String keyStorePassword, java.lang.String trustStorePassword)
          Prepares for the creation of an SSLContext using the supplied key/trust stores and passwords.
 
Method Summary
 javax.net.ssl.SSLContext getSSLContext()
          Gets an SSLContext.
 void setProtocol(java.lang.String protocol)
          The protocol used in SSLContext.getInstance(String); default "TLS".
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultTcpSSLContextSupport

public DefaultTcpSSLContextSupport(java.lang.String keyStore,
                                   java.lang.String trustStore,
                                   java.lang.String keyStorePassword,
                                   java.lang.String trustStorePassword)
Prepares for the creation of an SSLContext using the supplied key/trust stores and passwords.

Parameters:
keyStore - A Resource pointing to the keyStore.
trustStore - A Resource pointing to the trustStore.
keyStorePassword - The passowrd for the keyStore.
trustStorePassword - The password for the trustStore.
Method Detail

getSSLContext

public javax.net.ssl.SSLContext getSSLContext()
                                       throws java.security.GeneralSecurityException,
                                              java.io.IOException
Description copied from interface: TcpSSLContextSupport
Gets an SSLContext.

Specified by:
getSSLContext in interface TcpSSLContextSupport
Returns:
the SSLContext.
Throws:
java.security.GeneralSecurityException
java.io.IOException

setProtocol

public void setProtocol(java.lang.String protocol)
The protocol used in SSLContext.getInstance(String); default "TLS".

Parameters:
protocol - The protocol.

Spring Integration