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.SSLServerSocketFactory
SSL 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.ServerSocket
createServerSocket()
java.net.ServerSocket
createServerSocket(int port)
java.net.ServerSocket
createServerSocket(int port, int backLog)
java.net.ServerSocket
createServerSocket(int port, int backLog, java.net.InetAddress ifAddress)
DefaultSslContextFactory
getContextFactory()
Returns the parent SSL context factory.java.lang.String[]
getDefaultCipherSuites()
java.lang.String[]
getSupportedCipherSuites()
javax.net.ssl.SSLServerSocketFactory
getWrappedSocketFactory()
Returns the wrapped SSL server socket factory.protected javax.net.ssl.SSLServerSocket
initSslServerSocket(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:
createServerSocket
in classjavax.net.ServerSocketFactory
- Throws:
java.io.IOException
-
createServerSocket
public java.net.ServerSocket createServerSocket(int port) throws java.io.IOException
- Specified by:
createServerSocket
in classjavax.net.ServerSocketFactory
- Throws:
java.io.IOException
-
createServerSocket
public java.net.ServerSocket createServerSocket(int port, int backLog) throws java.io.IOException
- Specified by:
createServerSocket
in 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:
createServerSocket
in 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:
getDefaultCipherSuites
in classjavax.net.ssl.SSLServerSocketFactory
-
getSupportedCipherSuites
public java.lang.String[] getSupportedCipherSuites()
- Specified by:
getSupportedCipherSuites
in 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.
-
-