public class SslSocketConnector extends SocketConnector
| Modifier and Type | Class and Description |
|---|---|
class |
SslSocketConnector.SslConnection |
SocketConnector.ConnectionAbstractBuffers.ThreadBuffers| Modifier and Type | Field and Description |
|---|---|
static String |
DEFAULT_KEYSTORE
Default value for the keystore location path.
|
static String |
KEYPASSWORD_PROPERTY
String name of key password property.
|
static 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(Socket socket) |
protected SSLServerSocketFactory |
createFactory() |
void |
customize(EndPoint endpoint,
Request request)
Allow the Listener a chance to customise the request.
|
String[] |
getExcludeCipherSuites() |
int |
getHandshakeTimeout() |
String |
getKeystore() |
String |
getKeystoreType() |
boolean |
getNeedClientAuth() |
String |
getProtocol() |
String |
getProvider() |
String |
getSecureRandomAlgorithm() |
String |
getSslKeyManagerFactoryAlgorithm() |
String |
getSslTrustManagerFactoryAlgorithm() |
String |
getTruststore() |
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 ServerSocket |
newServerSocket(String host,
int port,
int backlog) |
void |
setAllowRenegotiate(boolean allowRenegotiate)
Set if SSL re-negotiation is allowed.
|
void |
setExcludeCipherSuites(String[] cipherSuites) |
void |
setHandshakeTimeout(int msec)
Set the time in milliseconds for so_timeout during ssl handshaking
|
void |
setKeyPassword(String password) |
void |
setKeystore(String keystore) |
void |
setKeystoreType(String keystoreType) |
void |
setNeedClientAuth(boolean needClientAuth)
Set the value of the needClientAuth property
|
void |
setPassword(String password) |
void |
setProtocol(String protocol) |
void |
setProvider(String _provider) |
void |
setSecureRandomAlgorithm(String algorithm) |
void |
setSslKeyManagerFactoryAlgorithm(String algorithm) |
void |
setSslTrustManagerFactoryAlgorithm(String algorithm) |
void |
setTrustPassword(String password) |
void |
setTruststore(String truststore) |
void |
setTruststoreType(String truststoreType) |
void |
setWantClientAuth(boolean wantClientAuth)
Set the value of the _wantClientAuth property.
|
close, doStart, doStop, getConnection, getLocalPort, newBuffer, newHttpConnection, opencheckForwardedHeaders, 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, toStringgetBuffer, getHeaderBufferSize, getRequestBufferSize, getResponseBufferSize, returnBuffer, setHeaderBufferSize, setRequestBufferSize, setResponseBufferSizeaddLifeCycleListener, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stopclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetHeaderBufferSize, getRequestBufferSize, getResponseBufferSize, setHeaderBufferSize, setRequestBufferSize, setResponseBufferSizeaddLifeCycleListener, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stopgetBuffer, returnBufferpublic static final String DEFAULT_KEYSTORE
public static final String KEYPASSWORD_PROPERTY
public static final 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 IOException,
InterruptedException
accept in class SocketConnectorIOExceptionInterruptedExceptionprotected void configure(Socket socket) throws IOException
configure in class AbstractConnectorIOExceptionprotected SSLServerSocketFactory createFactory() throws Exception
Exceptionpublic void customize(EndPoint endpoint, Request request) throws IOException
customize in interface Connectorcustomize in class SocketConnectorendpoint - The Socket the request arrived on.
This should be a SocketEndPoint wrapping a SSLSocket.request - HttpRequest to be customised.IOExceptionpublic String[] getExcludeCipherSuites()
public String getKeystore()
public String getKeystoreType()
public boolean getNeedClientAuth()
public String getProtocol()
public String getProvider()
public String getSecureRandomAlgorithm()
public String getSslKeyManagerFactoryAlgorithm()
public String getSslTrustManagerFactoryAlgorithm()
public String getTruststore()
public String getTruststoreType()
public boolean getWantClientAuth()
public boolean isConfidential(Request request)
isConfidential in interface ConnectorisConfidential in class AbstractConnectorrequest - A requestpublic boolean isIntegral(Request request)
isIntegral in interface ConnectorisIntegral in class AbstractConnectorrequest - A requestprotected ServerSocket newServerSocket(String host, int port, int backlog) throws IOException
newServerSocket in class SocketConnectoraddr - 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.IOExceptionsetWantClientAuth(boolean),
setNeedClientAuth(boolean),
#setCipherSuitespublic void setExcludeCipherSuites(String[] cipherSuites)
public void setKeyPassword(String password)
public void setKeystore(String keystore)
keystore - The resource path to the keystore, or null for built in keystores.public void setKeystoreType(String keystoreType)
public void setNeedClientAuth(boolean needClientAuth)
needClientAuth - true iff we require client certificate authentication.public void setPassword(String password)
public void setTrustPassword(String password)
public void setProtocol(String protocol)
public void setProvider(String _provider)
public void setSecureRandomAlgorithm(String algorithm)
public void setSslKeyManagerFactoryAlgorithm(String algorithm)
public void setSslTrustManagerFactoryAlgorithm(String algorithm)
public void setTruststore(String truststore)
public void setTruststoreType(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.