public class SslSelectChannelConnector extends SelectChannelConnector implements SslConnector
AbstractLifeCycle.AbstractLifeCycleListener
LifeCycle.Listener
_acceptChannel
_buffers, _lowResourceMaxIdleTime, _maxIdleTime, _soLingerTime
_listeners, FAILED, RUNNING, STARTED, STARTING, STOPPED, STOPPING
DEFAULT_KEYSTORE, DEFAULT_KEYSTORE_ALGORITHM, DEFAULT_TRUSTSTORE_ALGORITHM, KEYPASSWORD_PROPERTY, PASSWORD_PROPERTY
Constructor and Description |
---|
SslSelectChannelConnector() |
SslSelectChannelConnector(SslContextFactory sslContextFactory)
Construct with explicit SslContextFactory.
|
Modifier and Type | Method and Description |
---|---|
protected SSLEngine |
createSSLEngine(SocketChannel channel) |
void |
customize(EndPoint endpoint,
Request request)
Allow the Listener a chance to customise the request.
|
protected void |
doStart()
Start the managed lifecycle beans in the order they were added.
|
protected void |
doStop()
Stop the joined lifecycle beans in the reverse order they were added.
|
String |
getAlgorithm()
Deprecated.
|
String[] |
getExcludeCipherSuites()
Deprecated.
|
String[] |
getIncludeCipherSuites()
Deprecated.
|
String |
getKeystore()
Deprecated.
|
String |
getKeystoreType()
Deprecated.
|
boolean |
getNeedClientAuth()
Deprecated.
|
String |
getProtocol()
Deprecated.
|
String |
getProvider()
Deprecated.
|
String |
getSecureRandomAlgorithm()
Deprecated.
|
Buffers |
getSslBuffers() |
SSLContext |
getSslContext()
Deprecated.
|
SslContextFactory |
getSslContextFactory() |
String |
getSslKeyManagerFactoryAlgorithm()
Deprecated.
|
String |
getSslTrustManagerFactoryAlgorithm()
Deprecated.
|
String |
getTruststore()
Deprecated.
|
String |
getTruststoreType()
Deprecated.
|
boolean |
getWantClientAuth()
Deprecated.
|
boolean |
isAllowRenegotiate()
Deprecated.
|
boolean |
isConfidential(Request request)
By default, we're confidential, given we speak SSL.
|
boolean |
isIntegral(Request request)
By default, we're integral, given we speak SSL.
|
protected AsyncConnection |
newConnection(SocketChannel channel,
AsyncEndPoint endpoint) |
protected AsyncConnection |
newPlainConnection(SocketChannel channel,
AsyncEndPoint endPoint) |
protected SslConnection |
newSslConnection(AsyncEndPoint endpoint,
SSLEngine engine) |
void |
setAlgorithm(String algorithm)
Deprecated.
|
void |
setAllowRenegotiate(boolean allowRenegotiate)
Deprecated.
|
void |
setExcludeCipherSuites(String[] cipherSuites)
Deprecated.
|
void |
setIncludeCipherSuites(String[] cipherSuites)
Deprecated.
|
void |
setKeyPassword(String password)
Deprecated.
|
void |
setKeystore(String keystore)
Deprecated.
|
void |
setKeystoreType(String keystoreType)
Deprecated.
|
void |
setNeedClientAuth(boolean needClientAuth)
Deprecated.
|
void |
setPassword(String password)
Deprecated.
|
void |
setProtocol(String protocol)
Deprecated.
|
void |
setProvider(String provider)
Deprecated.
|
void |
setSecureRandomAlgorithm(String algorithm)
Deprecated.
|
void |
setSslContext(SSLContext sslContext)
Deprecated.
|
void |
setSslKeyManagerFactoryAlgorithm(String algorithm)
Deprecated.
|
void |
setSslTrustManagerFactoryAlgorithm(String algorithm)
Deprecated.
|
void |
setTrustPassword(String password)
Deprecated.
|
void |
setTruststore(String truststore)
Deprecated.
|
void |
setTruststoreType(String truststoreType)
Deprecated.
|
void |
setWantClientAuth(boolean wantClientAuth)
Deprecated.
|
accept, close, endPointClosed, getConnection, getLocalPort, getLowResourcesConnections, getLowResourcesMaxIdleTime, getSelectorManager, newEndPoint, open, persist, setLowResourcesConnections, setLowResourcesMaxIdleTime, setMaxIdleTime, setThreadPool
getUseDirectBuffers, setUseDirectBuffers
checkForwardedHeaders, configure, connectionClosed, connectionOpened, connectionUpgraded, getAcceptorPriorityOffset, getAcceptors, getAcceptQueueSize, getConfidentialPort, getConfidentialScheme, getConnections, getConnectionsDurationMax, getConnectionsDurationMean, getConnectionsDurationStdDev, getConnectionsDurationTotal, getConnectionsOpen, getConnectionsOpenMax, getConnectionsRequestsMax, getConnectionsRequestsMean, getConnectionsRequestsStdDev, getForwardedCipherSuiteHeader, getForwardedForHeader, getForwardedHostHeader, getForwardedProtoHeader, getForwardedServerHeader, getForwardedSslSessionIdHeader, getHost, getHostHeader, getIntegralPort, getIntegralScheme, getLeftMostFieldValue, getLowResourceMaxIdleTime, getMaxBuffers, getMaxIdleTime, getName, getPort, getRequestBuffers, getRequestBufferSize, getRequestBufferType, getRequestHeaderSize, getRequestHeaderType, getRequests, getResolveNames, getResponseBuffers, getResponseBufferSize, getResponseBufferType, getResponseHeaderSize, getResponseHeaderType, getReuseAddress, getServer, getSoLingerTime, getStatsOn, getStatsOnMs, getThreadPool, isForwarded, isLowResources, join, setAcceptorPriorityOffset, setAcceptors, setAcceptQueueSize, setConfidentialPort, setConfidentialScheme, setForwarded, setForwardedCipherSuiteHeader, setForwardedForHeader, setForwardedHostHeader, setForwardedProtoHeader, setForwardedServerHeader, setForwardedSslSessionIdHeader, setHost, setHostHeader, setIntegralPort, setIntegralScheme, setLowResourceMaxIdleTime, setMaxBuffers, setName, setPort, setRequestBuffers, setRequestBufferSize, setRequestHeaderSize, setResolveNames, setResponseBuffers, setResponseBufferSize, setResponseHeaderSize, setReuseAddress, setServer, setSoLingerTime, setStatsOn, statsReset, stopAccept, toString
addBean, addBean, contains, destroy, dump, dump, dump, dump, dump, dumpObject, dumpStdErr, dumpThis, getBean, getBeans, getBeans, isManaged, manage, removeBean, removeBeans, unmanage
addLifeCycleListener, getState, getState, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stop
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
close, getConfidentialPort, getConfidentialScheme, getConnection, getConnections, getConnectionsDurationMax, getConnectionsDurationMean, getConnectionsDurationStdDev, getConnectionsDurationTotal, getConnectionsOpen, getConnectionsOpenMax, getConnectionsRequestsMax, getConnectionsRequestsMean, getConnectionsRequestsStdDev, getHost, getIntegralPort, getIntegralScheme, getLocalPort, getLowResourceMaxIdleTime, getMaxIdleTime, getName, getPort, getRequestBuffers, getRequestBufferSize, getRequestHeaderSize, getRequests, getResolveNames, getResponseBuffers, getResponseBufferSize, getResponseHeaderSize, getServer, getStatsOn, getStatsOnMs, isLowResources, open, persist, setHost, setLowResourceMaxIdleTime, setMaxIdleTime, setPort, setRequestBufferSize, setRequestHeaderSize, setResponseBufferSize, setResponseHeaderSize, setServer, setStatsOn, statsReset
addLifeCycleListener, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stop
public SslSelectChannelConnector()
public SslSelectChannelConnector(SslContextFactory sslContextFactory)
AggregateLifeCycle.addBean(Object)
so that
it's lifecycle may be managed with AggregateLifeCycle
.sslContextFactory
- public void customize(EndPoint endpoint, Request request) throws IOException
customize
in interface Connector
customize
in class SelectChannelConnector
endpoint
- The Socket the request arrived on. This should be a
SocketEndPoint
wrapping a SSLSocket
.request
- HttpRequest to be customised.IOException
@Deprecated public boolean isAllowRenegotiate()
isAllowRenegotiate
in interface SslConnector
@Deprecated public void setAllowRenegotiate(boolean allowRenegotiate)
setAllowRenegotiate
in interface SslConnector
allowRenegotiate
- true if re-negotiation is allowed (default false)@Deprecated public String[] getExcludeCipherSuites()
getExcludeCipherSuites
in interface SslConnector
SSLEngine.setEnabledCipherSuites(String[])
SslConnector.getExcludeCipherSuites()
@Deprecated public void setExcludeCipherSuites(String[] cipherSuites)
setExcludeCipherSuites
in interface SslConnector
cipherSuites
- The array of Ciphersuite names to exclude from
SSLEngine.setEnabledCipherSuites(String[])
SslConnector.setExcludeCipherSuites(java.lang.String[])
@Deprecated public String[] getIncludeCipherSuites()
getIncludeCipherSuites
in interface SslConnector
SSLEngine.setEnabledCipherSuites(String[])
SslConnector.getExcludeCipherSuites()
@Deprecated public void setIncludeCipherSuites(String[] cipherSuites)
setIncludeCipherSuites
in interface SslConnector
cipherSuites
- The array of Ciphersuite names to include in
SSLEngine.setEnabledCipherSuites(String[])
SslConnector.setExcludeCipherSuites(java.lang.String[])
@Deprecated public void setPassword(String password)
setPassword
in interface SslConnector
password
- The password for the key storeSslConnector.setPassword(java.lang.String)
@Deprecated public void setTrustPassword(String password)
setTrustPassword
in interface SslConnector
password
- The password for the trust storeSslConnector.setTrustPassword(java.lang.String)
@Deprecated public void setKeyPassword(String password)
setKeyPassword
in interface SslConnector
password
- The password (if any) for the specific key within
the key storeSslConnector.setKeyPassword(java.lang.String)
@Deprecated public String getAlgorithm()
@Deprecated public void setAlgorithm(String algorithm)
@Deprecated public String getProtocol()
getProtocol
in interface SslConnector
SSLContext.getInstance(String, String)
SslConnector.getProtocol()
@Deprecated public void setProtocol(String protocol)
setProtocol
in interface SslConnector
protocol
- The SSL protocol (default "TLS") passed to SSLContext.getInstance(String, String)
SslConnector.setProtocol(java.lang.String)
@Deprecated public void setKeystore(String keystore)
setKeystore
in interface SslConnector
keystore
- The file or URL of the SSL Key store.SslConnector.setKeystore(java.lang.String)
@Deprecated public String getKeystore()
getKeystore
in interface SslConnector
SslConnector.getKeystore()
@Deprecated public String getKeystoreType()
getKeystoreType
in interface SslConnector
SslConnector.getKeystoreType()
@Deprecated public boolean getNeedClientAuth()
getNeedClientAuth
in interface SslConnector
SslConnector.getNeedClientAuth()
@Deprecated public boolean getWantClientAuth()
getWantClientAuth
in interface SslConnector
SslConnector.getWantClientAuth()
@Deprecated public void setNeedClientAuth(boolean needClientAuth)
setNeedClientAuth
in interface SslConnector
needClientAuth
- True if SSL needs client authentication.SslConnector.setNeedClientAuth(boolean)
@Deprecated public void setWantClientAuth(boolean wantClientAuth)
setWantClientAuth
in interface SslConnector
wantClientAuth
- True if SSL wants client authentication.SslConnector.setWantClientAuth(boolean)
@Deprecated public void setKeystoreType(String keystoreType)
setKeystoreType
in interface SslConnector
keystoreType
- The type of the key store (default "JKS")SslConnector.setKeystoreType(java.lang.String)
@Deprecated public String getProvider()
getProvider
in interface SslConnector
SSLContext.getInstance(String, String)
SslConnector.getProvider()
@Deprecated public String getSecureRandomAlgorithm()
getSecureRandomAlgorithm
in interface SslConnector
SecureRandom.getInstance(String)
to obtain the SecureRandom
instance passed to SSLContext.init(javax.net.ssl.KeyManager[], javax.net.ssl.TrustManager[], SecureRandom)
SslConnector.getSecureRandomAlgorithm()
@Deprecated public String getSslKeyManagerFactoryAlgorithm()
getSslKeyManagerFactoryAlgorithm
in interface SslConnector
KeyManagerFactory
SslConnector.getSslKeyManagerFactoryAlgorithm()
@Deprecated public String getSslTrustManagerFactoryAlgorithm()
getSslTrustManagerFactoryAlgorithm
in interface SslConnector
TrustManagerFactory
SslConnector.getSslTrustManagerFactoryAlgorithm()
@Deprecated public String getTruststore()
getTruststore
in interface SslConnector
SslConnector.getTruststore()
@Deprecated public String getTruststoreType()
getTruststoreType
in interface SslConnector
SslConnector.getTruststoreType()
@Deprecated public void setProvider(String provider)
setProvider
in interface SslConnector
provider
- The SSL provider name, which if set is passed to
SSLContext.getInstance(String, String)
SslConnector.setProvider(java.lang.String)
@Deprecated public void setSecureRandomAlgorithm(String algorithm)
setSecureRandomAlgorithm
in interface SslConnector
algorithm
- The algorithm name, which if set is passed to
SecureRandom.getInstance(String)
to obtain the SecureRandom
instance passed to SSLContext.init(javax.net.ssl.KeyManager[], javax.net.ssl.TrustManager[], SecureRandom)
SslConnector.setSecureRandomAlgorithm(java.lang.String)
@Deprecated public void setSslKeyManagerFactoryAlgorithm(String algorithm)
setSslKeyManagerFactoryAlgorithm
in interface SslConnector
algorithm
- The algorithm name (default "SunX509") used by
the KeyManagerFactory
SslConnector.setSslKeyManagerFactoryAlgorithm(java.lang.String)
@Deprecated public void setSslTrustManagerFactoryAlgorithm(String algorithm)
setSslTrustManagerFactoryAlgorithm
in interface SslConnector
algorithm
- The algorithm name (default "SunX509") used by the TrustManagerFactory
SslConnector.setSslTrustManagerFactoryAlgorithm(java.lang.String)
@Deprecated public void setTruststore(String truststore)
setTruststore
in interface SslConnector
truststore
- The file name or URL of the trust store locationSslConnector.setTruststore(java.lang.String)
@Deprecated public void setTruststoreType(String truststoreType)
setTruststoreType
in interface SslConnector
truststoreType
- The type of the trust store (default "JKS")SslConnector.setTruststoreType(java.lang.String)
@Deprecated public void setSslContext(SSLContext sslContext)
setSslContext
in interface SslConnector
sslContext
- Set a preconfigured SSLContextSslConnector.setSslContext(javax.net.ssl.SSLContext)
@Deprecated public SSLContext getSslContext()
getSslContext
in interface SslConnector
SslConnector.setSslContext(javax.net.ssl.SSLContext)
public SslContextFactory getSslContextFactory()
getSslContextFactory
in interface SslConnector
SslConnector.getSslContextFactory()
public boolean isConfidential(Request request)
isConfidential
in interface Connector
isConfidential
in class AbstractConnector
request
- A requestpublic boolean isIntegral(Request request)
isIntegral
in interface Connector
isIntegral
in class AbstractConnector
request
- A requestprotected AsyncConnection newConnection(SocketChannel channel, AsyncEndPoint endpoint)
newConnection
in class SelectChannelConnector
protected AsyncConnection newPlainConnection(SocketChannel channel, AsyncEndPoint endPoint)
protected SslConnection newSslConnection(AsyncEndPoint endpoint, SSLEngine engine)
protected SSLEngine createSSLEngine(SocketChannel channel) throws IOException
channel
- A channel which if passed is used as to extract remote
host and port for the purposes of SSL session cachingIOException
- if the SSLEngine cannot be createdprotected void doStart() throws Exception
AggregateLifeCycle
doStart
in class SelectChannelConnector
Exception
SelectChannelConnector.doStart()
protected void doStop() throws Exception
AggregateLifeCycle
doStop
in class AbstractConnector
Exception
AbstractConnector.doStop()
public Buffers getSslBuffers()
Copyright © 1995-2015 Mort Bay Consulting. All Rights Reserved.