public class HttpsConnector extends HttpConnector implements TlsDirectKeyStore, TlsIndirectKeyStore, TlsDirectTrustStore
HttpsConnector
provides Secure http connectivity on top of what is
already provided with the Mule HttpConnector
.Modifier and Type | Field and Description |
---|---|
static String |
HTTPS |
static String |
LOCAL_CERTIFICATES |
static String |
PEER_CERTIFICATES |
BIND_TO_ALL_INTERFACES_IP, clientConnectionManager, COOKIE_SPEC_NETSCAPE, COOKIE_SPEC_RFC2109, DEFAULT_CONNECTION_TIMEOUT, DEFAULT_HTTP_GET_BODY_PARAM_PROPERTY, DISABLE_STALE_CONNECTION_CHECK_SYSTEM_PROPERTY, endpointDispatchers, HTTP, HTTP_CONTEXT_PATH_PROPERTY, HTTP_CONTEXT_URI_PROPERTY, HTTP_COOKIE_SPEC_PROPERTY, HTTP_COOKIES_PROPERTY, HTTP_CUSTOM_HEADERS_MAP_PROPERTY, HTTP_DISABLE_STATUS_CODE_EXCEPTION_CHECK, HTTP_ENABLE_COOKIES_PROPERTY, HTTP_ENCODE_PARAMVALUE, HTTP_GET_BODY_PARAM_PROPERTY, HTTP_HEADERS, HTTP_INBOUND_PROPERTIES, HTTP_METHOD_PROPERTY, HTTP_PARAMS_PROPERTY, HTTP_POST_BODY_PARAM_PROPERTY, HTTP_PREFIX, HTTP_QUERY_PARAMS, HTTP_QUERY_STRING, HTTP_RELATIVE_PATH_PROPERTY, HTTP_REQUEST_PATH_PROPERTY, HTTP_REQUEST_PROPERTY, HTTP_SERVLET_REQUEST_PROPERTY, HTTP_SERVLET_RESPONSE_PROPERTY, HTTP_STATUS_PROPERTY, HTTP_VERSION_PROPERTY, ROOT_PATH, SINGLE_DISPATCHER_PER_ENDPOINT_SYSTEM_PROPERTY
CLIENT, DEFAULT_BACKLOG, DEFAULT_BUFFER_SIZE, DEFAULT_SO_LINGER, DEFAULT_SOCKET_TIMEOUT, DEFAULT_WAIT_TIMEOUT, KEEP_SEND_SOCKET_OPEN_PROPERTY, SEND_TCP_NO_DELAY_SYSTEM_PROPERTY, SERVER, TCP
createMultipleTransactedReceivers, DEFAULT_NUM_CONCURRENT_TX_RECEIVERS, dispatcherFactory, dispatcherPoolFactory, dispatchers, initialStateStopped, lifecycleManager, logger, muleContext, muleMessageFactory, name, numberOfConcurrentTransactedReceivers, PROPERTY_POLLING_FREQUENCY, receivers, requesterFactory, requesters, serviceDescriptor, serviceOverrides, sessionHandler, startOnConnect
INT_VALUE_NOT_SET
PHASE_NAME
Constructor and Description |
---|
HttpsConnector(MuleContext context) |
Modifier and Type | Method and Description |
---|---|
protected void |
doInitialise() |
String |
getClientKeyStore() |
String |
getClientKeyStorePassword() |
String |
getClientKeyStoreType() |
String |
getKeyAlias() |
String |
getKeyManagerAlgorithm() |
KeyManagerFactory |
getKeyManagerFactory() |
String |
getKeyPassword() |
String |
getKeyStore() |
String |
getKeyStorePassword() |
String |
getKeyStoreType() |
String |
getProtocol() |
protected ServerSocket |
getServerSocket(URI uri) |
long |
getSslHandshakeTimeout() |
SSLSocketFactory |
getSslSocketFactory() |
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 |
setKeyAlias(String keyAlias) |
void |
setKeyManagerAlgorithm(String keyManagerAlgorithm) |
void |
setKeyPassword(String keyPassword) |
void |
setKeyStore(String keyStore) |
void |
setKeyStorePassword(String storePassword) |
void |
setKeyStoreType(String keystoreType) |
void |
setRequireClientAuthentication(boolean requireClientAuthentication)
If a server socket is constructed directly (see
TlsConfiguration ) then this flag will
control whether client authenticatin is required. |
void |
setSslHandshakeTimeout(long sslHandshakeTimeout) |
void |
setSslType(String sslType) |
void |
setTrustManagerAlgorithm(String trustManagerAlgorithm) |
void |
setTrustManagerFactory(TrustManagerFactory trustManagerFactory) |
void |
setTrustStore(String trustStore) |
void |
setTrustStorePassword(String trustStorePassword) |
void |
setTrustStoreType(String trustStoreType) |
applyDispatcherLifecycle, borrowDispatcher, connect, createDispatcherMessageProcessor, disconnect, doClientConnect, doDispose, doStart, doStop, findReceiverByStem, findReceiverByStemConsideringMatchingHost, getClientConnectionManager, getCookieSpec, getProxyHostname, getProxyPassword, getProxyPort, getProxyUsername, getReceiver, getReceiverKey, getReceivers, isEnableCookies, isKeepSendSocketOpen, isProxyNtlmAuthentication, lookupReceiver, lookupReceiver, lookupReceiver, normalizeUrl, registerListener, returnDispatcher, setClientConnectionManager, setCookieSpec, setEnableCookies, setKeepSendSocketOpen, setProxyHostname, setProxyNtlmAuthentication, setProxyPassword, setProxyPort, setProxyUsername, setupClientAuthorization, uriMatchesReceiver
configureSocket, doConnect, doDisconnect, getBacklog, getBufferSize, getClientSoTimeout, getConnectionTimeout, getDispatchers, getKeepAliveMonitor, getKeepAliveTimeout, getOutputStream, getReceiveBacklog, getReceiveBufferSize, getSendBufferSize, getServerSocketFactory, getServerSoTimeout, getSocket, getSocketFactory, getSocketMaxWait, getSocketSoLinger, getSocketsPoolMaxActive, getSocketsPoolMaxIdle, getSocketsPoolMaxWait, getSocketsPoolNumActive, getTcpProtocol, isFailOnUnresolvedHost, isKeepAlive, isResponseEnabled, isReuseAddress, isSendTcpNoDelay, setBacklog, setBufferSize, setClientSoTimeout, setConnectionTimeout, setDispatcherFactory, setFailOnUnresolvedHost, setKeepAlive, setKeepAliveTimeout, setReceiveBacklog, setReceiveBufferSize, setReuseAddress, setSendBufferSize, setSendTcpNoDelay, setServerSocketFactory, setServerSoTimeout, setSocketFactory, setSocketMaxWait, setSocketSoLinger, setTcpProtocol, setTimeout
clearDispatchers, clearRequesters, configureDispatcherPool, connect, createDefaultRedeliveryPolicy, createMuleMessageFactory, createOperationResource, createReceiver, createScheduler, destroyReceiver, disconnect, dispose, disposeReceivers, disposeWorkManagers, doUnregisterListener, fireNotification, getCanonicalURI, getConnectEventId, getConnectionDescription, getDefaultExchangePattern, getDefaultInboundTransformers, getDefaultOutboundTransformers, getDefaultResponseTransformers, getDispatcherFactory, getDispatcherPoolFactory, getDispatcherThreadingProfile, getDispatcherWorkManager, getInboundExchangePatterns, getLifecycleState, getMaxDispatchersActive, getMaxRequestersActive, getMaxTotalDispatchers, getMuleContext, getMuleMessageFactory, getName, getNumberOfConcurrentTransactedReceivers, getOperationResourceFactory, getOutboundExchangePatterns, getOutputStream, getReceivers, getReceiverThreadingProfile, getReceiverWorkManager, getReplyToHandler, getRequesterFactory, getRequesterThreadingProfile, getRequesterWorkManager, getRetryPolicyTemplate, getScheduler, getServiceDescriptor, getServiceOverrides, getSessionHandler, getSupportedProtocols, getTransactionalResource, handleWorkException, initFromServiceDescriptor, initialise, initialiseFromUrl, initWorkManagers, isConnected, isConnecting, isCreateMultipleTransactedReceivers, isDisposed, isEnableMessageEvents, isInitialised, isInitialStateStopped, isStarted, isStarting, isStopped, isStopping, isValidateConnections, registerSupportedMetaProtocol, registerSupportedProtocol, registerSupportedProtocolWithoutPrefix, request, request, setConnected, setConnecting, setCreateMultipleTransactedReceivers, setDispatcherPoolFactory, setDispatcherPoolMaxWait, setDispatcherPoolWhenExhaustedAction, setDispatcherThreadingProfile, setDynamicNotification, setInitialStateStopped, setMaxDispatchersActive, setMaxRequestersActive, setName, setNumberOfConcurrentTransactedReceivers, setReceiverThreadingProfile, setRequesterFactory, setRequesterPoolMaxWait, setRequesterPoolWhenExhaustedAction, setRequesterThreadingProfile, setRetryPolicyTemplate, setServiceOverrides, setSessionHandler, setSupportedProtocols, setupDispatchReturn, setupRequestReturn, setValidateConnections, shutdownScheduler, start, startAfterConnect, stop, supportsProtocol, toString, unregisterListener, unregisterSupportedProtocol, updateCachedNotificationHandler, validateConnection, workAccepted, workCompleted, workRejected, workStarted
public static final String HTTPS
public static final String PEER_CERTIFICATES
public static final String LOCAL_CERTIFICATES
public HttpsConnector(MuleContext context)
protected ServerSocket getServerSocket(URI uri) throws IOException
getServerSocket
in class HttpConnector
IOException
protected void doInitialise() throws InitialisationException
doInitialise
in class HttpConnector
InitialisationException
public String getProtocol()
getProtocol
in interface Connector
getProtocol
in class HttpConnector
Connector.getProtocol()
public String getClientKeyStore()
getClientKeyStore
in interface TlsIndirectKeyStore
public String getClientKeyStorePassword()
getClientKeyStorePassword
in interface TlsIndirectKeyStore
public String getClientKeyStoreType()
getClientKeyStoreType
in interface TlsIndirectKeyStore
TlsIndirectKeyStore.setClientKeyStore(String)
public String getKeyManagerAlgorithm()
getKeyManagerAlgorithm
in interface TlsDirectKeyStore
public KeyManagerFactory getKeyManagerFactory()
getKeyManagerFactory
in interface TlsDirectKeyStore
public String getKeyPassword()
getKeyPassword
in interface TlsDirectKeyStore
public String getKeyAlias()
getKeyAlias
in interface TlsDirectKeyStore
public String getKeyStore()
getKeyStore
in interface TlsDirectKeyStore
public String getKeyStoreType()
getKeyStoreType
in interface TlsDirectKeyStore
TlsDirectKeyStore.getKeyStore()
public String getSslType()
public String getKeyStorePassword()
getKeyStorePassword
in interface TlsDirectKeyStore
public String getTrustManagerAlgorithm()
getTrustManagerAlgorithm
in interface TlsDirectTrustStore
public TrustManagerFactory getTrustManagerFactory()
getTrustManagerFactory
in interface TlsDirectTrustStore
TlsDirectTrustStore.setTrustManagerFactory(TrustManagerFactory)
or one
constructed from the parameters in this interface (TlsDirectTrustStore.setTrustStoreType(String)
etc).public String getTrustStore()
getTrustStore
in interface TlsIndirectTrustStore
public String getTrustStorePassword()
getTrustStorePassword
in interface TlsIndirectTrustStore
TlsIndirectTrustStore.getTrustStore()
public String getTrustStoreType()
getTrustStoreType
in interface TlsDirectTrustStore
TlsIndirectTrustStore.getTrustStore()
public boolean isExplicitTrustStoreOnly()
TlsDirectTrustStore
isExplicitTrustStoreOnly
in interface TlsDirectTrustStore
public boolean isRequireClientAuthentication()
TlsDirectTrustStore
TlsConfiguration
) then this flag will
control whether client authenticatin is required. This does not apply to client connections.isRequireClientAuthentication
in interface TlsDirectTrustStore
public void setClientKeyStore(String clientKeyStore) throws IOException
setClientKeyStore
in interface TlsIndirectKeyStore
clientKeyStore
- 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 TlsIndirectKeyStore
clientKeyStorePassword
- The password used to protect the keystore itselfpublic void setClientKeyStoreType(String clientKeyStoreType)
setClientKeyStoreType
in interface TlsIndirectKeyStore
public void setExplicitTrustStoreOnly(boolean explicitTrustStoreOnly)
TlsDirectTrustStore
setExplicitTrustStoreOnly
in interface TlsDirectTrustStore
explicitTrustStoreOnly
- true if the key store data should not be used when a trust
store is otherwise undefinedpublic void setKeyManagerAlgorithm(String keyManagerAlgorithm)
setKeyManagerAlgorithm
in interface TlsDirectKeyStore
keyManagerAlgorithm
- The algorithm used by the key store. The default comes from {public void setKeyPassword(String keyPassword)
setKeyPassword
in interface TlsDirectKeyStore
keyPassword
- The password used to protect the private key(s)public void setKeyAlias(String keyAlias)
setKeyAlias
in interface TlsDirectKeyStore
keyAlias
- of the key from the key store.public void setKeyStore(String keyStore) throws IOException
setKeyStore
in interface TlsDirectKeyStore
keyStore
- 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 TlsDirectKeyStore
keystoreType
- The type of keystore used in TlsDirectKeyStore.setKeyStore(String)
public void setRequireClientAuthentication(boolean requireClientAuthentication)
TlsDirectTrustStore
TlsConfiguration
) then this flag will
control whether client authenticatin is required. This does not apply to client connections.setRequireClientAuthentication
in interface TlsDirectTrustStore
requireClientAuthentication
- true if clients must be authenticatedpublic void setSslType(String sslType)
public void setKeyStorePassword(String storePassword)
setKeyStorePassword
in interface TlsDirectKeyStore
storePassword
- The password used to protect the keystore itselfpublic void setTrustManagerAlgorithm(String trustManagerAlgorithm)
setTrustManagerAlgorithm
in interface TlsDirectTrustStore
trustManagerAlgorithm
- The algorithm used by the trust store.public void setTrustManagerFactory(TrustManagerFactory trustManagerFactory)
setTrustManagerFactory
in interface TlsDirectTrustStore
trustManagerFactory
- 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 TlsIndirectTrustStore
trustStore
- 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 TlsIndirectTrustStore
trustStorePassword
- The password used to protected the trust store defined in
TlsIndirectTrustStore.setTrustStore(String)
public void setTrustStoreType(String trustStoreType)
setTrustStoreType
in interface TlsDirectTrustStore
trustStoreType
- The type of keystore used to implement the trust store defined in
TlsIndirectTrustStore.setTrustStore(String)
public long getSslHandshakeTimeout()
public void setSslHandshakeTimeout(long sslHandshakeTimeout)
public SSLSocketFactory getSslSocketFactory() throws GeneralSecurityException
GeneralSecurityException
Copyright © 2003–2015 MuleSoft, Inc.. All rights reserved.