public class SslConnector extends TcpConnector implements TlsDirectKeyStore, TlsIndirectKeyStore, TlsDirectTrustStore, TlsProtocolHandler
SslConnector provides a connector for SSL connections.
Note that the *only* function of the code in this package is to configure and
provide SSL enabled sockets. All other logic is identical to TCP.| Modifier and Type | Field and Description |
|---|---|
static String |
LOCAL_CERTIFICATES |
static String |
PEER_CERTIFICATES |
static String |
SSL |
CLIENT, DEFAULT_BACKLOG, DEFAULT_BUFFER_SIZE, DEFAULT_SO_LINGER, DEFAULT_SOCKET_TIMEOUT, KEEP_SEND_SOCKET_OPEN_PROPERTY, SERVER, TCPconnected, connectedSemaphore, connecting, connectionStrategy, createMultipleTransactedReceivers, DEFAULT_NUM_CONCURRENT_TX_RECEIVERS, dispatcherFactory, dispatchers, disposed, disposing, exceptionListener, initialised, logger, muleContext, name, numberOfConcurrentTransactedReceivers, receivers, requesterFactory, requesters, serviceDescriptor, serviceOverrides, sessionHandler, started, startOnConnectINT_VALUE_NOT_SETPHASE_NAMEPHASE_NAMEPHASE_NAMEPHASE_NAME| Constructor and Description |
|---|
SslConnector() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
doInitialise() |
String |
getClientKeyStore() |
String |
getClientKeyStorePassword() |
String |
getClientKeyStoreType() |
String |
getKeyManagerAlgorithm() |
KeyManagerFactory |
getKeyManagerFactory() |
String |
getKeyPassword() |
String |
getKeyStore() |
String |
getKeyStorePassword() |
String |
getKeyStoreType() |
String |
getProtocol() |
String |
getProtocolHandler() |
Provider |
getProvider() |
SecurityProviderFactory |
getSecurityProviderFactory() |
protected ServerSocket |
getServerSocket(URI uri) |
String |
getSslType() |
String |
getTrustManagerAlgorithm() |
TrustManagerFactory |
getTrustManagerFactory() |
String |
getTrustStore() |
String |
getTrustStorePassword() |
String |
getTrustStoreType() |
boolean |
isExplicitTrustStoreOnly()
If the trust store is undefined and the trust store generated via System properties then the
key store certificates defined via
TODO can be used as a source of trust information. |
boolean |
isRequireClientAuthentication()
If a server socket is constructed directly (see
TlsConfiguration) then this flag will
control whether client authenticatin is required. |
void |
setClientKeyStore(String clientKeyStore) |
void |
setClientKeyStorePassword(String clientKeyStorePassword) |
void |
setClientKeyStoreType(String clientKeyStoreType) |
void |
setExplicitTrustStoreOnly(boolean explicitTrustStoreOnly)
If the trust store is undefined and the trust store generated via System properties then the
key store certificates defined via
TODO can be used as a source of trust information. |
void |
setKeyManagerAlgorithm(String keyManagerAlgorithm) |
void |
setKeyPassword(String keyPassword) |
void |
setKeyStore(String keyStore) |
void |
setKeyStorePassword(String storePassword) |
void |
setKeyStoreType(String keystoreType) |
void |
setProtocolHandler(String protocolHandler) |
void |
setProvider(Provider provider) |
void |
setRequireClientAuthentication(boolean requireClientAuthentication)
If a server socket is constructed directly (see
TlsConfiguration) then this flag will
control whether client authenticatin is required. |
void |
setSecurityProviderFactory(SecurityProviderFactory spFactory) |
void |
setSslType(String sslType) |
void |
setTrustManagerAlgorithm(String trustManagerAlgorithm) |
void |
setTrustManagerFactory(TrustManagerFactory trustManagerFactory) |
void |
setTrustStore(String trustStore) |
void |
setTrustStorePassword(String trustStorePassword) |
void |
setTrustStoreType(String trustStoreType) |
configureSocket, doConnect, doDisconnect, doDispose, doStart, doStop, getBacklog, getBufferSize, getClientSoTimeout, getKeepAliveMonitor, getKeepAliveTimeout, getOutputStream, getReceiveBacklog, getReceiveBufferSize, getSendBufferSize, getServerSocketFactory, getServerSoTimeout, getSocket, getSocketFactory, getSocketSoLinger, getTcpProtocol, isKeepAlive, isKeepSendSocketOpen, isRemoteSyncEnabled, isReuseAddress, isSendTcpNoDelay, isValidateConnections, setBacklog, setBufferSize, setClientSoTimeout, setKeepAlive, setKeepAliveTimeout, setKeepSendSocketOpen, setReceiveBacklog, setReceiveBufferSize, setReuseAddress, setSendBufferSize, setSendTcpNoDelay, setServerSocketFactory, setServerSoTimeout, setSocketFactory, setSocketSoLinger, setTcpProtocol, setTimeout, setValidateConnectionscheckDisposed, connect, createReceiver, destroyReceiver, disconnect, dispatch, dispose, disposeDispatchers, disposeReceivers, disposeRequesters, disposeWorkManagers, exceptionThrown, fireNotification, getConnectedSemaphore, getConnectEventId, getConnectionDescription, getConnectionStrategy, getDefaultInboundTransformers, getDefaultOutboundTransformers, getDefaultResponseTransformers, getDispatcherFactory, getDispatcherThreadingProfile, getDispatcherWorkManager, getExceptionListener, getMaxDispatchersActive, getMaxRequestersActive, getMessageAdapter, getMuleContext, getName, getNumberOfConcurrentTransactedReceivers, getOutputStream, getReceiver, getReceiverKey, getReceivers, getReceivers, getReceiverThreadingProfile, getReceiverWorkManager, getReplyToHandler, getRequesterFactory, getRequesterThreadingProfile, getRequesterWorkManager, getScheduler, getServiceDescriptor, getServiceOverrides, getSessionHandler, getSupportedProtocols, handleException, handleWorkException, initFromServiceDescriptor, initialise, initialiseFromUrl, initWorkManagers, isConnected, isCreateMultipleTransactedReceivers, isDisposed, isDisposing, isEnableMessageEvents, isStarted, isSyncEnabled, lookupReceiver, registerListener, registerSupportedProtocol, registerSupportedProtocolWithoutPrefix, request, request, send, setConnectionStrategy, setCreateMultipleTransactedReceivers, setDispatcherFactory, setDispatcherThreadingProfile, setDynamicNotification, setExceptionListener, setMaxDispatchersActive, setMaxRequestersActive, setMuleContext, setName, setNumberOfConcurrentTransactedReceivers, setReceiverThreadingProfile, setRequesterFactory, setRequesterThreadingProfile, setServiceOverrides, setSessionHandler, setSupportedProtocols, setupDispatchReturn, setupRequestReturn, start, stop, supportsProtocol, toString, unregisterListener, unregisterSupportedProtocol, updateCachedNotificationHandler, workAccepted, workCompleted, workRejected, workStartedpublic static final String SSL
public static final String PEER_CERTIFICATES
public static final String LOCAL_CERTIFICATES
protected void doInitialise()
throws InitialisationException
doInitialise in class TcpConnectorInitialisationExceptionprotected ServerSocket getServerSocket(URI uri) throws IOException
getServerSocket in class TcpConnectorIOExceptionpublic String getProtocol()
getProtocol in interface ConnectorgetProtocol in class TcpConnectorpublic String getClientKeyStore()
getClientKeyStore in interface TlsIndirectKeyStorepublic String getClientKeyStorePassword()
getClientKeyStorePassword in interface TlsIndirectKeyStorepublic String getClientKeyStoreType()
getClientKeyStoreType in interface TlsIndirectKeyStoreTlsIndirectKeyStore.setClientKeyStore(String)public String getKeyManagerAlgorithm()
getKeyManagerAlgorithm in interface TlsDirectKeyStorepublic KeyManagerFactory getKeyManagerFactory()
getKeyManagerFactory in interface TlsDirectKeyStorepublic String getKeyPassword()
getKeyPassword in interface TlsDirectKeyStorepublic String getKeyStore()
getKeyStore in interface TlsDirectKeyStorepublic String getKeyStoreType()
getKeyStoreType in interface TlsDirectKeyStoreTlsDirectKeyStore.getKeyStore()public String getProtocolHandler()
getProtocolHandler in interface TlsProtocolHandlerpublic Provider getProvider()
public SecurityProviderFactory getSecurityProviderFactory()
public String getSslType()
public String getKeyStorePassword()
getKeyStorePassword in interface TlsDirectKeyStorepublic String getTrustManagerAlgorithm()
getTrustManagerAlgorithm in interface TlsDirectTrustStorepublic TrustManagerFactory getTrustManagerFactory()
getTrustManagerFactory in interface TlsDirectTrustStoreTlsDirectTrustStore.setTrustManagerFactory(TrustManagerFactory) or one
constructed from the parameters in this interface (TlsIndirectTrustStore.setTrustStore(String) etc).public String getTrustStore()
getTrustStore in interface TlsIndirectTrustStorepublic String getTrustStorePassword()
getTrustStorePassword in interface TlsIndirectTrustStoreTlsIndirectTrustStore.getTrustStore()public String getTrustStoreType()
getTrustStoreType in interface TlsDirectTrustStoreTlsIndirectTrustStore.getTrustStore()public boolean isExplicitTrustStoreOnly()
TlsDirectTrustStoreTODO can be used as a source of trust information.isExplicitTrustStoreOnly in interface TlsDirectTrustStorepublic boolean isRequireClientAuthentication()
TlsDirectTrustStoreTlsConfiguration) then this flag will
control whether client authenticatin is required. This does not apply to client connections.isRequireClientAuthentication in interface TlsDirectTrustStorepublic void setClientKeyStore(String clientKeyStore) throws IOException
setClientKeyStore in interface TlsIndirectKeyStoreclientKeyStore - The location of the keystore that contains public certificates and private keys
for identification.IOException - If the location cannot be resolved via the file system or classpathpublic void setClientKeyStorePassword(String clientKeyStorePassword)
setClientKeyStorePassword in interface TlsIndirectKeyStoreclientKeyStorePassword - The password used to protect the keystore itselfpublic void setClientKeyStoreType(String clientKeyStoreType)
setClientKeyStoreType in interface TlsIndirectKeyStorepublic void setExplicitTrustStoreOnly(boolean explicitTrustStoreOnly)
TlsDirectTrustStoreTODO can be used as a source of trust information.setExplicitTrustStoreOnly in interface TlsDirectTrustStoreexplicitTrustStoreOnly - true if the key store data should not be used when a trust
store is otherwise undefinedpublic void setKeyManagerAlgorithm(String keyManagerAlgorithm)
setKeyManagerAlgorithm in interface TlsDirectKeyStorekeyManagerAlgorithm - The algorithm used by the key store. The default comes from {public void setKeyPassword(String keyPassword)
setKeyPassword in interface TlsDirectKeyStorekeyPassword - The password used to protect the private key(s)public void setKeyStore(String keyStore) throws IOException
setKeyStore in interface TlsDirectKeyStorekeyStore - The location of the keystore that contains public certificates and private keys
for identification.IOException - If the location cannot be resolved via the file system or classpathpublic void setKeyStoreType(String keystoreType)
setKeyStoreType in interface TlsDirectKeyStorekeystoreType - The type of keystore used in TlsDirectKeyStore.setKeyStore(String)public void setProtocolHandler(String protocolHandler)
setProtocolHandler in interface TlsProtocolHandlerpublic void setProvider(Provider provider)
public void setRequireClientAuthentication(boolean requireClientAuthentication)
TlsDirectTrustStoreTlsConfiguration) then this flag will
control whether client authenticatin is required. This does not apply to client connections.setRequireClientAuthentication in interface TlsDirectTrustStorerequireClientAuthentication - true if clients must be authenticatedpublic void setSecurityProviderFactory(SecurityProviderFactory spFactory)
public void setSslType(String sslType)
public void setKeyStorePassword(String storePassword)
setKeyStorePassword in interface TlsDirectKeyStorestorePassword - The password used to protect the keystore itselfpublic void setTrustManagerAlgorithm(String trustManagerAlgorithm)
setTrustManagerAlgorithm in interface TlsDirectTrustStoretrustManagerAlgorithm - The algorithm used by the trust store. The default comes from {public void setTrustManagerFactory(TrustManagerFactory trustManagerFactory)
setTrustManagerFactory in interface TlsDirectTrustStoretrustManagerFactory - The source of trust information if the store is accessed directly
(some connectors generate trust stores indirectly through System properties in which case this
value will be ignored - see TlsConfiguration).public void setTrustStore(String trustStore) throws IOException
setTrustStore in interface TlsIndirectTrustStoretrustStore - The location of the keystore that contains public certificates of trusted servers.IOException - If the location cannot be resolved via the file system or classpathpublic void setTrustStorePassword(String trustStorePassword)
setTrustStorePassword in interface TlsIndirectTrustStoretrustStorePassword - The password used to protected the trust store defined in
TlsIndirectTrustStore.setTrustStore(String)public void setTrustStoreType(String trustStoreType)
setTrustStoreType in interface TlsDirectTrustStoretrustStoreType - The type of keystore used to implement the trust store defined in
TlsIndirectTrustStore.setTrustStore(String)Copyright © 2003-2012 MuleSource, Inc.. All Rights Reserved.