public class SslListener extends SocketListener
ThreadPool.PoolThread
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.
|
__DAEMON, __PRIORITY
ATTRIBUTE
Constructor and Description |
---|
SslListener()
Constructor.
|
SslListener(InetAddrPort p_address)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected Socket |
accept(ServerSocket p_serverSocket) |
protected SSLServerSocketFactory |
createFactory() |
protected void |
customizeRequest(Socket socket,
HttpRequest request)
Allow the Listener a chance to customise the request.
|
String |
getAlgorithm() |
String[] |
getCipherSuites() |
String |
getKeystore() |
String |
getKeystoreType() |
boolean |
getNeedClientAuth() |
String |
getProtocol() |
String |
getProvider() |
boolean |
getWantClientAuth() |
boolean |
isConfidential(HttpConnection connection)
By default, we're confidential, given we speak SSL.
|
boolean |
isIntegral(HttpConnection connection)
By default, we're integral, given we speak SSL.
|
protected ServerSocket |
newServerSocket(InetAddrPort p_address,
int p_acceptQueueSize)
New server socket.
|
void |
setAlgorithm(String algorithm) |
void |
setCipherSuites(String[] cipherSuites) |
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 |
setWantClientAuth(boolean wantClientAuth)
Set the value of the needClientAuth property
|
createConnection, customizeRequest, getBufferReserve, getBufferSize, getConfidentialPort, getConfidentialScheme, getDefaultScheme, getHttpHandler, getHttpServer, getIdentifyListener, getIntegralPort, getIntegralScheme, getLowResourcePersistTimeMs, getLowResources, handleConnection, isLowOnResources, isOutOfResources, persistConnection, setBufferReserve, setBufferSize, setConfidentialPort, setConfidentialScheme, setDefaultScheme, setHttpHandler, setHttpServer, setIdentifyListener, setIntegralPort, setIntegralScheme, setLowResourcePersistTimeMs, setLowResources, start, stop
acceptSocket, acceptSocket, getAcceptorThreads, getAcceptQueueSize, getHost, getInetAddress, getInetAddrPort, getLingerTimeSecs, getMaxReadTimeMs, getPort, getServerSocket, getTcpNoDelay, handle, handleConnection, open, setAcceptorThreads, setAcceptQueueSize, setHost, setInetAddress, setInetAddrPort, setLingerTimeSecs, setMaxReadTimeMs, setPort, setTcpNoDelay, stopJob, toString
getIdleThreads, getMaxIdleTimeMs, getMaxThreads, getMinThreads, getName, getPoolName, getThreads, getThreadsPriority, isDaemon, isStarted, join, run, setDaemon, setMaxIdleTimeMs, setMaxStopTimeMs, setMaxThreads, setMinThreads, setName, setPoolName, setThreadsPriority, shrink
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getHost, getPort, setHost, setPort
public static final String DEFAULT_KEYSTORE
public static final String PASSWORD_PROPERTY
public static final String KEYPASSWORD_PROPERTY
public SslListener()
public SslListener(InetAddrPort p_address)
p_address
- public String[] getCipherSuites()
public void setCipherSuites(String[] cipherSuites)
cipherSuites
- author Tony Jiangpublic void setPassword(String password)
public void setKeyPassword(String password)
public String getAlgorithm()
public void setAlgorithm(String algorithm)
public String getProtocol()
public void setProtocol(String protocol)
public void setKeystore(String keystore)
public String getKeystore()
public String getKeystoreType()
public void setKeystoreType(String keystoreType)
public void setNeedClientAuth(boolean needClientAuth)
needClientAuth
- true iff we require client certificate authentication.public boolean getNeedClientAuth()
public void setWantClientAuth(boolean wantClientAuth)
wantClientAuth
- true iff we would like client certificate authentication.public boolean getWantClientAuth()
public boolean isIntegral(HttpConnection connection)
isIntegral
in interface HttpListener
isIntegral
in class SocketListener
connection
- The connection to test.public boolean isConfidential(HttpConnection connection)
isConfidential
in interface HttpListener
isConfidential
in class SocketListener
connection
- The connection to test.protected SSLServerSocketFactory createFactory() throws Exception
Exception
protected ServerSocket newServerSocket(InetAddrPort p_address, int p_acceptQueueSize) throws IOException
ThreadedServer
newServerSocket
in class ThreadedServer
p_address
- p_acceptQueueSize
- IOException
protected Socket accept(ServerSocket p_serverSocket) throws IOException
p_serverSocket
- IOException
protected void customizeRequest(Socket socket, HttpRequest request)
customizeRequest
in class SocketListener
socket
- The Socket the request arrived on. This should be a javax.net.ssl.SSLSocket.request
- HttpRequest to be customised.public String getProvider()
public void setProvider(String _provider)
Copyright © 2013. All rights reserved.