public class SslSocketConnector extends SocketConnector
Modifier and Type | Class and Description |
---|---|
class |
SslSocketConnector.SslConnection |
SocketConnector.Connection
AbstractBuffers.ThreadBuffers
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DEFAULT_KEYSTORE
Default value for the keystore location path.
|
static java.lang.String |
KEYPASSWORD_PROPERTY
String name of key password property.
|
static java.lang.String |
PASSWORD_PROPERTY
String name of keystore password property.
|
_connections, _serverSocket
_lowResourceMaxIdleTime, _maxIdleTime, _soLingerTime
Constructor and Description |
---|
SslSocketConnector()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
accept(int acceptorID) |
protected void |
configure(java.net.Socket socket) |
protected javax.net.ssl.SSLServerSocketFactory |
createFactory() |
void |
customize(EndPoint endpoint,
Request request)
Allow the Listener a chance to customise the request.
|
java.lang.String[] |
getExcludeCipherSuites() |
int |
getHandshakeTimeout() |
java.lang.String |
getKeystore() |
java.lang.String |
getKeystoreType() |
boolean |
getNeedClientAuth() |
java.lang.String |
getProtocol() |
java.lang.String |
getProvider() |
java.lang.String |
getSecureRandomAlgorithm() |
java.lang.String |
getSslKeyManagerFactoryAlgorithm() |
java.lang.String |
getSslTrustManagerFactoryAlgorithm() |
java.lang.String |
getTruststore() |
java.lang.String |
getTruststoreType() |
boolean |
getWantClientAuth() |
boolean |
isAllowRenegotiate() |
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 java.net.ServerSocket |
newServerSocket(java.lang.String host,
int port,
int backlog) |
void |
setAllowRenegotiate(boolean allowRenegotiate)
Set if SSL re-negotiation is allowed.
|
void |
setExcludeCipherSuites(java.lang.String[] cipherSuites) |
void |
setHandshakeTimeout(int msec)
Set the time in milliseconds for so_timeout during ssl handshaking
|
void |
setKeyPassword(java.lang.String password) |
void |
setKeystore(java.lang.String keystore) |
void |
setKeystoreType(java.lang.String keystoreType) |
void |
setNeedClientAuth(boolean needClientAuth)
Set the value of the needClientAuth property
|
void |
setPassword(java.lang.String password) |
void |
setProtocol(java.lang.String protocol) |
void |
setProvider(java.lang.String _provider) |
void |
setSecureRandomAlgorithm(java.lang.String algorithm) |
void |
setSslKeyManagerFactoryAlgorithm(java.lang.String algorithm) |
void |
setSslTrustManagerFactoryAlgorithm(java.lang.String algorithm) |
void |
setTrustPassword(java.lang.String password) |
void |
setTruststore(java.lang.String truststore) |
void |
setTruststoreType(java.lang.String truststoreType) |
void |
setWantClientAuth(boolean wantClientAuth)
Set the value of the _wantClientAuth property.
|
close, doStart, doStop, getConnection, getLocalPort, newBuffer, newHttpConnection, open
checkForwardedHeaders, connectionClosed, connectionOpened, getAcceptorPriorityOffset, getAcceptors, getAcceptQueueSize, getConfidentialPort, getConfidentialScheme, getConnections, getConnectionsDurationAve, getConnectionsDurationMax, getConnectionsDurationMin, getConnectionsDurationTotal, getConnectionsOpen, getConnectionsOpenMax, getConnectionsOpenMin, getConnectionsRequestsAve, getConnectionsRequestsMax, getConnectionsRequestsMin, getForwardedForHeader, getForwardedHostHeader, getForwardedServerHeader, getHost, getHostHeader, getIntegralPort, getIntegralScheme, getLeftMostValue, getLowResourceMaxIdleTime, getMaxIdleTime, getName, getPort, getRequests, getResolveNames, getReuseAddress, getServer, getSoLingerTime, getStatsOn, getStatsOnMs, getThreadPool, isForwarded, join, newContinuation, persist, setAcceptorPriorityOffset, setAcceptors, setAcceptQueueSize, setConfidentialPort, setConfidentialScheme, setForwarded, setForwardedForHeader, setForwardedHostHeader, setForwardedServerHeader, setHost, setHostHeader, setIntegralPort, setIntegralScheme, setLowResourceMaxIdleTime, setMaxIdleTime, setName, setPort, setResolveNames, setReuseAddress, setServer, setSoLingerTime, setStatsOn, setThreadPool, statsReset, stopAccept, toString
getBuffer, getHeaderBufferSize, getRequestBufferSize, getResponseBufferSize, returnBuffer, setHeaderBufferSize, setRequestBufferSize, setResponseBufferSize
addLifeCycleListener, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stop
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getHeaderBufferSize, getRequestBufferSize, getResponseBufferSize, setHeaderBufferSize, setRequestBufferSize, setResponseBufferSize
addLifeCycleListener, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stop
getBuffer, returnBuffer
public static final java.lang.String DEFAULT_KEYSTORE
public static final java.lang.String KEYPASSWORD_PROPERTY
public static final java.lang.String PASSWORD_PROPERTY
public boolean isAllowRenegotiate()
public void setAllowRenegotiate(boolean allowRenegotiate)
allowRenegotiate
- true if re-negotiation is allowed (default false)public void accept(int acceptorID) throws java.io.IOException, java.lang.InterruptedException
accept
in class SocketConnector
java.io.IOException
java.lang.InterruptedException
protected void configure(java.net.Socket socket) throws java.io.IOException
configure
in class AbstractConnector
java.io.IOException
protected javax.net.ssl.SSLServerSocketFactory createFactory() throws java.lang.Exception
java.lang.Exception
public void customize(EndPoint endpoint, Request request) throws java.io.IOException
customize
in interface Connector
customize
in class SocketConnector
endpoint
- The Socket the request arrived on.
This should be a SocketEndPoint
wrapping a SSLSocket
.request
- HttpRequest to be customised.java.io.IOException
public java.lang.String[] getExcludeCipherSuites()
public java.lang.String getKeystore()
public java.lang.String getKeystoreType()
public boolean getNeedClientAuth()
public java.lang.String getProtocol()
public java.lang.String getProvider()
public java.lang.String getSecureRandomAlgorithm()
public java.lang.String getSslKeyManagerFactoryAlgorithm()
public java.lang.String getSslTrustManagerFactoryAlgorithm()
public java.lang.String getTruststore()
public java.lang.String getTruststoreType()
public boolean getWantClientAuth()
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 java.net.ServerSocket newServerSocket(java.lang.String host, int port, int backlog) throws java.io.IOException
newServerSocket
in class SocketConnector
addr
- The address
that this server should listen onbacklog
- See ServerSocket.bind(java.net.SocketAddress, int)
socket object
bound to the supplied address with all other
settings as per the current configuration of this connector.java.io.IOException
setWantClientAuth(boolean)
,
setNeedClientAuth(boolean)
,
#setCipherSuites
public void setExcludeCipherSuites(java.lang.String[] cipherSuites)
public void setKeyPassword(java.lang.String password)
public void setKeystore(java.lang.String keystore)
keystore
- The resource path to the keystore, or null for built in keystores.public void setKeystoreType(java.lang.String keystoreType)
public void setNeedClientAuth(boolean needClientAuth)
needClientAuth
- true iff we require client certificate authentication.public void setPassword(java.lang.String password)
public void setTrustPassword(java.lang.String password)
public void setProtocol(java.lang.String protocol)
public void setProvider(java.lang.String _provider)
public void setSecureRandomAlgorithm(java.lang.String algorithm)
public void setSslKeyManagerFactoryAlgorithm(java.lang.String algorithm)
public void setSslTrustManagerFactoryAlgorithm(java.lang.String algorithm)
public void setTruststore(java.lang.String truststore)
public void setTruststoreType(java.lang.String truststoreType)
public void setWantClientAuth(boolean wantClientAuth)
opening server sockets
.wantClientAuth
- true iff we want client certificate authentication.SSLServerSocket.setWantClientAuth(boolean)
public void setHandshakeTimeout(int msec)
msec
- a non-zero value will be used to set so_timeout during
ssl handshakes. A zero value means the maxIdleTime is used instead.public int getHandshakeTimeout()
Copyright © 2009 Mortbay Consulting Pty. Ltd. All Rights Reserved.