org.mule.transport.servlet.jetty
Class JettyHttpsConnector
java.lang.Object
org.mule.transport.AbstractConnector
org.mule.transport.servlet.jetty.JettyHttpConnector
org.mule.transport.servlet.jetty.JettyHttpsConnector
- All Implemented Interfaces:
- java.util.EventListener, javax.resource.spi.work.WorkListener, Disposable, Initialisable, Lifecycle, LifecycleStateEnabled, Startable, Stoppable, NamedObject, TlsDirectKeyStore, TlsDirectTrustStore, TlsIndirectKeyStore, TlsIndirectTrustStore, TlsProtocolHandler, Connectable, Connector
- Direct Known Subclasses:
- AjaxConnector
public class JettyHttpsConnector
- extends JettyHttpConnector
- implements TlsDirectKeyStore, TlsIndirectKeyStore, TlsDirectTrustStore, TlsProtocolHandler
The JettyHttpsConnector
can be using to embed a Jetty server to receive requests on an http inbound endpoint.
One server is created for each connector declared, many Jetty endpoints can share the same connector.
Fields inherited from class org.mule.transport.AbstractConnector |
connected, createMultipleTransactedReceivers, DEFAULT_NUM_CONCURRENT_TX_RECEIVERS, dispatcherFactory, dispatcherPoolFactory, dispatchers, initialStateStopped, lifecycleManager, logger, muleContext, muleMessageFactory, name, numberOfConcurrentTransactedReceivers, receivers, requesterFactory, requesters, serviceDescriptor, serviceOverrides, sessionHandler, startOnConnect |
Methods inherited from class org.mule.transport.servlet.jetty.JettyHttpConnector |
createContextHolder, createReceiver, createServlet, doConnect, doDisconnect, doDispose, doStart, doStop, getConfigFile, getHolderKey, getHttpServer, getReceiverServlet, getReplyToHandler, initialiseFromConfigFile, isUseContinuations, setConfigFile, setReceiverServlet, setUseContinuations, unregisterListener |
Methods inherited from class org.mule.transport.AbstractConnector |
clearDispatchers, clearRequesters, configureDispatcherPool, connect, createDispatcherMessageProcessor, createMuleMessageFactory, createScheduler, destroyReceiver, disconnect, dispose, disposeReceivers, disposeWorkManagers, doUnregisterListener, exceptionThrown, fireNotification, getConnectEventId, getConnectionDescription, getDefaultExchangePattern, getDefaultInboundTransformers, getDefaultOutboundTransformers, getDefaultResponseTransformers, getDispatcherFactory, getDispatcherPoolFactory, getDispatcherThreadingProfile, getDispatcherWorkManager, getInboundExchangePatterns, getLifecycleState, getMaxDispatchersActive, getMaxRequestersActive, getMaxTotalDispatchers, getMuleContext, getMuleMessageFactory, getName, getNumberOfConcurrentTransactedReceivers, getOutboundExchangePatterns, getOutputStream, getReceiver, getReceiverKey, getReceivers, getReceivers, getReceiverThreadingProfile, getReceiverWorkManager, getRequesterFactory, getRequesterThreadingProfile, getRequesterWorkManager, getRetryPolicyTemplate, getScheduler, getServiceDescriptor, getServiceOverrides, getSessionHandler, getSupportedProtocols, handleException, handleException, handleWorkException, initFromServiceDescriptor, initialise, initialiseFromUrl, initWorkManagers, isConnected, isCreateMultipleTransactedReceivers, isDisposed, isEnableMessageEvents, isInitialised, isInitialStateStopped, isResponseEnabled, isStarted, isStopped, isValidateConnections, lookupReceiver, registerListener, registerSupportedMetaProtocol, registerSupportedProtocol, registerSupportedProtocolWithoutPrefix, request, request, setConnected, setCreateMultipleTransactedReceivers, setDispatcherFactory, 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 |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
JETTY_SSL
public static final java.lang.String JETTY_SSL
- See Also:
- Constant Field Values
HTTPS
public static final java.lang.String HTTPS
- See Also:
- Constant Field Values
PEER_CERTIFICATES
public static final java.lang.String PEER_CERTIFICATES
- See Also:
- Constant Field Values
LOCAL_CERTIFICATES
public static final java.lang.String LOCAL_CERTIFICATES
- See Also:
- Constant Field Values
JettyHttpsConnector
public JettyHttpsConnector(MuleContext context)
doInitialise
protected void doInitialise()
throws InitialisationException
- Overrides:
doInitialise
in class JettyHttpConnector
- Throws:
InitialisationException
validateSslConfig
protected void validateSslConfig()
throws InitialisationException
- Throws:
InitialisationException
getProtocol
public java.lang.String getProtocol()
- Specified by:
getProtocol
in interface Connector
- Overrides:
getProtocol
in class JettyHttpConnector
- Returns:
- the primary protocol name for endpoints of this connector
getClientKeyStore
public java.lang.String getClientKeyStore()
- Specified by:
getClientKeyStore
in interface TlsIndirectKeyStore
- Returns:
- The location (resolved relative to the current classpath and file system, if possible)
of the keystore that contains public certificates and private keys for identification.
getClientKeyStorePassword
public java.lang.String getClientKeyStorePassword()
- Specified by:
getClientKeyStorePassword
in interface TlsIndirectKeyStore
- Returns:
- The password used to protect the keystore itself
getClientKeyStoreType
public java.lang.String getClientKeyStoreType()
- Specified by:
getClientKeyStoreType
in interface TlsIndirectKeyStore
- Returns:
- The type of keystore used in
TlsIndirectKeyStore.setClientKeyStore(String)
getKeyManagerAlgorithm
public java.lang.String getKeyManagerAlgorithm()
- Specified by:
getKeyManagerAlgorithm
in interface TlsDirectKeyStore
- Returns:
- The algorithm used by the key store. The default comes from {
getKeyManagerFactory
public javax.net.ssl.KeyManagerFactory getKeyManagerFactory()
- Specified by:
getKeyManagerFactory
in interface TlsDirectKeyStore
- Returns:
- A source of key stores generated from the parameters supplied here.
getKeyPassword
public java.lang.String getKeyPassword()
- Specified by:
getKeyPassword
in interface TlsDirectKeyStore
- Returns:
- The password used to protect the private key(s)
getKeyStore
public java.lang.String getKeyStore()
- Specified by:
getKeyStore
in interface TlsDirectKeyStore
- Returns:
- The location (resolved relative to the current classpath and file system, if possible)
of the keystore that contains public certificates and private keys for identification.
getKeyStoreType
public java.lang.String getKeyStoreType()
- Specified by:
getKeyStoreType
in interface TlsDirectKeyStore
- Returns:
- The type of keystore used in
TlsDirectKeyStore.getKeyStore()
getProtocolHandler
public java.lang.String getProtocolHandler()
- Specified by:
getProtocolHandler
in interface TlsProtocolHandler
getProvider
public java.security.Provider getProvider()
getSecurityProviderFactory
public SecurityProviderFactory getSecurityProviderFactory()
getSslType
public java.lang.String getSslType()
getKeyStorePassword
public java.lang.String getKeyStorePassword()
- Specified by:
getKeyStorePassword
in interface TlsDirectKeyStore
- Returns:
- The password used to protect the keystore itself
getTrustManagerAlgorithm
public java.lang.String getTrustManagerAlgorithm()
- Specified by:
getTrustManagerAlgorithm
in interface TlsDirectTrustStore
- Returns:
- The algorithm used by the trust store. The default comes from
AutoDiscoverySecurityProviderFactory
getTrustManagerFactory
public javax.net.ssl.TrustManagerFactory getTrustManagerFactory()
- Specified by:
getTrustManagerFactory
in interface TlsDirectTrustStore
- Returns:
- Either the factory defined by
TlsDirectTrustStore.setTrustManagerFactory(TrustManagerFactory)
or one
constructed from the parameters in this interface (TlsDirectTrustStore.setTrustStoreType(String)
etc).
getTrustStore
public java.lang.String getTrustStore()
- Specified by:
getTrustStore
in interface TlsIndirectTrustStore
- Returns:
- The location (resolved relative to the current classpath and file system, if possible)
of the keystore that contains public certificates of trusted servers.
getTrustStorePassword
public java.lang.String getTrustStorePassword()
- Specified by:
getTrustStorePassword
in interface TlsIndirectTrustStore
- Returns:
- The password used to protected the trust store defined in
TlsIndirectTrustStore.getTrustStore()
getTrustStoreType
public java.lang.String getTrustStoreType()
- Specified by:
getTrustStoreType
in interface TlsDirectTrustStore
- Returns:
- The type of keystore used to implement the trust store defined in
TlsIndirectTrustStore.getTrustStore()
isExplicitTrustStoreOnly
public boolean isExplicitTrustStoreOnly()
- Description copied from interface:
TlsDirectTrustStore
- 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.
- Specified by:
isExplicitTrustStoreOnly
in interface TlsDirectTrustStore
- Returns:
- true if the key store data should not be used when a trust store is otherwise
undefined
isRequireClientAuthentication
public boolean isRequireClientAuthentication()
- Description copied from interface:
TlsDirectTrustStore
- If a server socket is constructed directly (see
TlsConfiguration
) then this flag will
control whether client authenticatin is required. This does not apply to client connections.
- Specified by:
isRequireClientAuthentication
in interface TlsDirectTrustStore
- Returns:
- true if clients must be authenticated
setClientKeyStore
public void setClientKeyStore(java.lang.String clientKeyStore)
throws java.io.IOException
- Specified by:
setClientKeyStore
in interface TlsIndirectKeyStore
- Parameters:
clientKeyStore
- The location of the keystore that contains public certificates and private keys
for identification.
- Throws:
java.io.IOException
- If the location cannot be resolved via the file system or classpath
setClientKeyStorePassword
public void setClientKeyStorePassword(java.lang.String clientKeyStorePassword)
- Specified by:
setClientKeyStorePassword
in interface TlsIndirectKeyStore
- Parameters:
clientKeyStorePassword
- The password used to protect the keystore itself
setClientKeyStoreType
public void setClientKeyStoreType(java.lang.String clientKeyStoreType)
- Specified by:
setClientKeyStoreType
in interface TlsIndirectKeyStore
setExplicitTrustStoreOnly
public void setExplicitTrustStoreOnly(boolean explicitTrustStoreOnly)
- Description copied from interface:
TlsDirectTrustStore
- 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.
- Specified by:
setExplicitTrustStoreOnly
in interface TlsDirectTrustStore
- Parameters:
explicitTrustStoreOnly
- true if the key store data should not be used when a trust
store is otherwise undefined
setKeyManagerAlgorithm
public void setKeyManagerAlgorithm(java.lang.String keyManagerAlgorithm)
- Specified by:
setKeyManagerAlgorithm
in interface TlsDirectKeyStore
- Parameters:
keyManagerAlgorithm
- The algorithm used by the key store. The default comes from {
setKeyPassword
public void setKeyPassword(java.lang.String keyPassword)
- Specified by:
setKeyPassword
in interface TlsDirectKeyStore
- Parameters:
keyPassword
- The password used to protect the private key(s)
setKeyStore
public void setKeyStore(java.lang.String keyStore)
throws java.io.IOException
- Specified by:
setKeyStore
in interface TlsDirectKeyStore
- Parameters:
keyStore
- The location of the keystore that contains public certificates and private keys
for identification.
- Throws:
java.io.IOException
- If the location cannot be resolved via the file system or classpath
setKeyStoreType
public void setKeyStoreType(java.lang.String keystoreType)
- Specified by:
setKeyStoreType
in interface TlsDirectKeyStore
- Parameters:
keystoreType
- The type of keystore used in TlsDirectKeyStore.setKeyStore(String)
setProtocolHandler
public void setProtocolHandler(java.lang.String protocolHandler)
- Specified by:
setProtocolHandler
in interface TlsProtocolHandler
setProvider
public void setProvider(java.security.Provider provider)
setRequireClientAuthentication
public void setRequireClientAuthentication(boolean requireClientAuthentication)
- Description copied from interface:
TlsDirectTrustStore
- If a server socket is constructed directly (see
TlsConfiguration
) then this flag will
control whether client authenticatin is required. This does not apply to client connections.
- Specified by:
setRequireClientAuthentication
in interface TlsDirectTrustStore
- Parameters:
requireClientAuthentication
- true if clients must be authenticated
setSecurityProviderFactory
public void setSecurityProviderFactory(SecurityProviderFactory spFactory)
setSslType
public void setSslType(java.lang.String sslType)
setKeyStorePassword
public void setKeyStorePassword(java.lang.String storePassword)
- Specified by:
setKeyStorePassword
in interface TlsDirectKeyStore
- Parameters:
storePassword
- The password used to protect the keystore itself
setTrustManagerAlgorithm
public void setTrustManagerAlgorithm(java.lang.String trustManagerAlgorithm)
- Specified by:
setTrustManagerAlgorithm
in interface TlsDirectTrustStore
- Parameters:
trustManagerAlgorithm
- The algorithm used by the trust store. The default comes from
AutoDiscoverySecurityProviderFactory
setTrustManagerFactory
public void setTrustManagerFactory(javax.net.ssl.TrustManagerFactory trustManagerFactory)
- Specified by:
setTrustManagerFactory
in interface TlsDirectTrustStore
- Parameters:
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
).
setTrustStore
public void setTrustStore(java.lang.String trustStore)
throws java.io.IOException
- Specified by:
setTrustStore
in interface TlsIndirectTrustStore
- Parameters:
trustStore
- The location of the keystore that contains public certificates of trusted servers.
- Throws:
java.io.IOException
- If the location cannot be resolved via the file system or classpath
setTrustStorePassword
public void setTrustStorePassword(java.lang.String trustStorePassword)
- Specified by:
setTrustStorePassword
in interface TlsIndirectTrustStore
- Parameters:
trustStorePassword
- The password used to protected the trust store defined in
TlsIndirectTrustStore.setTrustStore(String)
setTrustStoreType
public void setTrustStoreType(java.lang.String trustStoreType)
- Specified by:
setTrustStoreType
in interface TlsDirectTrustStore
- Parameters:
trustStoreType
- The type of keystore used to implement the trust store defined in
TlsIndirectTrustStore.setTrustStore(String)
createJettyConnector
protected org.mortbay.jetty.AbstractConnector createJettyConnector()
- Overrides:
createJettyConnector
in class JettyHttpConnector
Copyright © 2003-2010 MuleSoft, Inc.. All Rights Reserved.