Package org.restlet.engine.ssl
Class WrapperSslServerSocketFactory
- java.lang.Object
-
- javax.net.ServerSocketFactory
-
- javax.net.ssl.SSLServerSocketFactory
-
- org.restlet.engine.ssl.WrapperSslServerSocketFactory
-
public class WrapperSslServerSocketFactory extends javax.net.ssl.SSLServerSocketFactorySSL server socket factory that wraps the default one to do extra initialization. Configures the cipher suites and the SSL certificate request.- Author:
- Jerome Louvel
-
-
Constructor Summary
Constructors Constructor Description WrapperSslServerSocketFactory(DefaultSslContextFactory contextFactory, javax.net.ssl.SSLServerSocketFactory wrappedSocketFactory)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.net.ServerSocketcreateServerSocket()java.net.ServerSocketcreateServerSocket(int port)java.net.ServerSocketcreateServerSocket(int port, int backLog)java.net.ServerSocketcreateServerSocket(int port, int backLog, java.net.InetAddress ifAddress)DefaultSslContextFactorygetContextFactory()Returns the parent SSL context factory.java.lang.String[]getDefaultCipherSuites()java.lang.String[]getSupportedCipherSuites()javax.net.ssl.SSLServerSocketFactorygetWrappedSocketFactory()Returns the wrapped SSL server socket factory.protected javax.net.ssl.SSLServerSocketinitSslServerSocket(javax.net.ssl.SSLServerSocket sslServerSocket)Initializes the SSL server socket.
-
-
-
Constructor Detail
-
WrapperSslServerSocketFactory
public WrapperSslServerSocketFactory(DefaultSslContextFactory contextFactory, javax.net.ssl.SSLServerSocketFactory wrappedSocketFactory)
Constructor.- Parameters:
contextFactory- The parent SSL context factory.wrappedSocketFactory- The wrapped SSL server socket factory.
-
-
Method Detail
-
createServerSocket
public java.net.ServerSocket createServerSocket() throws java.io.IOException- Overrides:
createServerSocketin classjavax.net.ServerSocketFactory- Throws:
java.io.IOException
-
createServerSocket
public java.net.ServerSocket createServerSocket(int port) throws java.io.IOException- Specified by:
createServerSocketin classjavax.net.ServerSocketFactory- Throws:
java.io.IOException
-
createServerSocket
public java.net.ServerSocket createServerSocket(int port, int backLog) throws java.io.IOException- Specified by:
createServerSocketin classjavax.net.ServerSocketFactory- Throws:
java.io.IOException
-
createServerSocket
public java.net.ServerSocket createServerSocket(int port, int backLog, java.net.InetAddress ifAddress) throws java.io.IOException- Specified by:
createServerSocketin classjavax.net.ServerSocketFactory- Throws:
java.io.IOException
-
getContextFactory
public DefaultSslContextFactory getContextFactory()
Returns the parent SSL context factory.- Returns:
- The parent SSL context factory.
-
getDefaultCipherSuites
public java.lang.String[] getDefaultCipherSuites()
- Specified by:
getDefaultCipherSuitesin classjavax.net.ssl.SSLServerSocketFactory
-
getSupportedCipherSuites
public java.lang.String[] getSupportedCipherSuites()
- Specified by:
getSupportedCipherSuitesin classjavax.net.ssl.SSLServerSocketFactory
-
getWrappedSocketFactory
public javax.net.ssl.SSLServerSocketFactory getWrappedSocketFactory()
Returns the wrapped SSL server socket factory.- Returns:
- The wrapped SSL server socket factory.
-
initSslServerSocket
protected javax.net.ssl.SSLServerSocket initSslServerSocket(javax.net.ssl.SSLServerSocket sslServerSocket)
Initializes the SSL server socket. Configures the certificate request (need or want) and the enabled cipher suites.- Parameters:
sslServerSocket- The server socket to initialize.- Returns:
- The initialized server socket.
-
-