public class SSLServerSocketFactory
extends javax.net.ssl.SSLServerSocketFactory
This class is for creating SSLServerSockets. It utilizes the com.ibm.websphere.ssl.JSSEHelper APIs to retrieve WebSphere SSL configuration information. You can pass in a Properties object containing SSL properties, an SSL alias, or allow it to return the default SSL properties.
JSSEHelper
Constructor and Description |
---|
SSLServerSocketFactory()
This is the default constructor which will retrieve the default SSL configuration
for creating ServerSockets.
|
SSLServerSocketFactory(java.util.Properties sslprops)
This constructor allows you to pass in a set of SSL properties used
for creating ServerSockets.
|
SSLServerSocketFactory(java.lang.String alias)
This constructor allows you to pass in an SSL alias to retrieve an
SSL configuration other than the default for creating ServerSockets.
|
SSLServerSocketFactory(java.lang.String alias,
java.lang.String localEndPointName)
This constructor allows you to pass in an SSL alias or localEndPointName,
depending upon what is available.
|
Modifier and Type | Method and Description |
---|---|
java.net.ServerSocket |
createServerSocket()
Returns an unbound server socket.
|
java.net.ServerSocket |
createServerSocket(int port)
Returns a server socket bound to the specified port.
|
java.net.ServerSocket |
createServerSocket(int port,
int backlog)
Returns a server socket bound to the specified port, and uses the
specified connection backlog.
|
java.net.ServerSocket |
createServerSocket(int port,
int backlog,
java.net.InetAddress ifAddress)
Returns a server socket bound to the specified port, with a specified
listen backlog and local IP.
|
static javax.net.ServerSocketFactory |
getDefault()
Returns a copy of the environment's default socket factory.
|
java.lang.String[] |
getDefaultCipherSuites()
Returns the list of cipher suites which are enabled by default.
|
java.lang.String[] |
getSupportedCipherSuites()
Returns the names of the cipher suites which could be enabled for
use on an SSL connection created by this factory.
|
public SSLServerSocketFactory()
This is the default constructor which will retrieve the default SSL configuration for creating ServerSockets. It first tries to find the javax.net.ssl.* properties and if not present will choose the default SSL configuration.
public SSLServerSocketFactory(java.lang.String alias)
This constructor allows you to pass in an SSL alias to retrieve an SSL configuration other than the default for creating ServerSockets. If the alias is not found, the default SSL configuration will be used.
String
- aliaspublic SSLServerSocketFactory(java.util.Properties sslprops)
This constructor allows you to pass in a set of SSL properties used for creating ServerSockets.
java.util.Properties
- sslpropspublic SSLServerSocketFactory(java.lang.String alias, java.lang.String localEndPointName)
This constructor allows you to pass in an SSL alias or localEndPointName, depending upon what is available. You may specified null for any parameters. If SSL alias is specified, a direct selection will occur and default properties will be used if the alias is not found. If localEndPointName is specified, a group selection will occur where the localEndPoint will be used to determine if an SSL config is associated with that endpoint. If not, it will move up the topology to determine the next management scope that has an SSL configuration associated which this EndPoint falls under (e.g., server -> node -> cell, etc.).
String
- aliasString
- localEndPointNamepublic static javax.net.ServerSocketFactory getDefault()
Returns a copy of the environment's default socket factory.
public java.lang.String[] getDefaultCipherSuites()
Returns the list of cipher suites which are enabled by default.
getDefaultCipherSuites
in class javax.net.ssl.SSLServerSocketFactory
public java.lang.String[] getSupportedCipherSuites()
Returns the names of the cipher suites which could be enabled for use on an SSL connection created by this factory.
getSupportedCipherSuites
in class javax.net.ssl.SSLServerSocketFactory
public java.net.ServerSocket createServerSocket() throws java.io.IOException
Returns an unbound server socket. The socket is configured with the socket options (such as accept timeout) given to this factory.
createServerSocket
in class javax.net.ServerSocketFactory
java.io.IOException
public java.net.ServerSocket createServerSocket(int port) throws java.io.IOException
Returns a server socket bound to the specified port. The socket is configured with the socket options (such as accept timeout) given to this factory.
createServerSocket
in class javax.net.ServerSocketFactory
int
- portjava.io.IOException
public java.net.ServerSocket createServerSocket(int port, int backlog) throws java.io.IOException
Returns a server socket bound to the specified port, and uses the specified connection backlog. The socket is configured with the socket options (such as accept timeout) given to this factory.
createServerSocket
in class javax.net.ServerSocketFactory
int
- portint
- backlogjava.io.IOException
public java.net.ServerSocket createServerSocket(int port, int backlog, java.net.InetAddress ifAddress) throws java.io.IOException
Returns a server socket bound to the specified port, with a specified listen backlog and local IP. The bindAddr argument can be used on a multi-homed host for a ServerSocket that will only accept connect requests to one of its addresses. The socket is configured with the socket options (such as accept timeout) given to this factory.
createServerSocket
in class javax.net.ServerSocketFactory
int
- portint
- backlogInetAddress
- ifAddressjava.io.IOException