com.ibm.websphere.ssl.protocol
Class SSLSocketFactory
- java.lang.Object
javax.net.SocketFactory
javax.net.ssl.SSLSocketFactory
com.ibm.websphere.ssl.protocol.SSLSocketFactory
- public class SSLSocketFactory
- extends javax.net.ssl.SSLSocketFactory
This class is for creating SSLSockets. 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, or an SSL alias, or allow it to return the default SSLSocketFactory.
Field Summary
Modifier and Type | Field and Description |
---|---|
|
default_constructor
|
|
props
|
Constructor Summary
Constructor and Description |
---|
SSLSocketFactory()
This is the default constructor which will retrieve the default SSL configuration
for creating Sockets.
|
SSLSocketFactory(java.util.Properties sslprops)
This constructor allows you to pass in a set of SSL properties used
for creating Sockets.
|
SSLSocketFactory(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 Sockets.
|
SSLSocketFactory(java.lang.String alias,java.util.Map connectionInfo)
This constructor allows you to pass in an SSL alias, and/or connectionInfo.
|
Method Summary
Modifier and Type | Method and Description |
---|---|
|
createSocket()
Creates an unconnected socket.
|
|
createSocket(java.net.InetAddress host,int port)
Creates a socket and connects it to the specified port number at the
specified address.
|
|
createSocket(java.net.InetAddress address,int port,java.net.InetAddress localAddress,int localPort)
Creates a socket and connects it to the specified remote host on the
specified remote port.
|
|
createSocket(java.net.Socket s,java.lang.String host,int port,boolean autoClose)
Returns a socket layered over an existing socket connected to the
named host, at the given port.
|
|
createSocket(java.lang.String host,int port)
Creates a socket and connects it to the specified remote host at the
specified remote port.
|
|
createSocket(java.lang.String host,int port,java.net.InetAddress localHost,int localPort)
Creates a socket and connects it to the specified remote host on the
specified remote port.
|
|
getDefault()
Returns a copy of the environment's default socket factory.
|
|
getDefaultCipherSuites()
Returns the list of cipher suites which are enabled by default.
|
|
getSupportedCipherSuites()
Returns the names of the cipher suites which could be enabled for
use on an SSL connection created by this factory.
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail
props
- protected java.util.Properties props
default_constructor
- protected boolean default_constructor
Constructor Detail
SSLSocketFactory
- public SSLSocketFactory()
SSLSocketFactory
- public SSLSocketFactory(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 Sockets. If the alias is not found, the default SSL configuration will be used.
SSLSocketFactory
- public SSLSocketFactory(java.util.Properties sslprops)
This constructor allows you to pass in a set of SSL properties used for creating Sockets.
SSLSocketFactory
- public SSLSocketFactory(java.lang.String alias,
- java.util.Map connectionInfo)
This constructor allows you to pass in an SSL alias, and/or connectionInfo. depending upon what is available. You may specified null for any parameters. If the connectionInfo is specified, a check will be made to determine if a dynamic association between protocol/host/port has been made for this particular protocol and target host/port. If there is not dynamic association and an SSL alias is specified, a direct selection will occur. Finally, a group selection will occur where the localEndPoint (contained in the connectionInfo) 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.).
Method Detail
getDefault
- public static javax.net.SocketFactory getDefault( )
Returns a copy of the environment's default socket factory.
getDefaultCipherSuites
- public java.lang.String[] getDefaultCipherSuites( )
Returns the list of cipher suites which are enabled by default.
getDefaultCipherSuites
in class javax.net.ssl.SSLSocketFactory
getSupportedCipherSuites
- public java.lang.String[] getSupportedCipherSuites( )
getSupportedCipherSuites
in class javax.net.ssl.SSLSocketFactory
createSocket
- public java.net.Socket createSocket( )
- throws java.io.IOException
Creates an unconnected socket.
createSocket
in class javax.net.SocketFactory
java.io.IOException
createSocket
- public java.net.Socket createSocket( java.net.Socket s,
- java.lang.String host,
- int port,
- boolean autoClose)
- throws java.io.IOException
- java.net.UnknownHostException
Returns a socket layered over an existing socket connected to the named host, at the given port. The properties used to create the SSL socket are based upon the what was passed into the SSLSocketFactory constructor.
createSocket
in class javax.net.ssl.SSLSocketFactory
java.io.IOException
java.net.UnknownHostException
createSocket
- public java.net.Socket createSocket( java.net.InetAddress host,
- int port)
- throws java.io.IOException
Creates a socket and connects it to the specified port number at the specified address. The properties used to create the SSL socket are based upon the what was passed into the SSLSocketFactory constructor.
createSocket
in class javax.net.SocketFactory
java.io.IOException
createSocket
- public java.net.Socket createSocket( java.net.InetAddress address,
- int port,
- java.net.InetAddress localAddress,
- int localPort)
- throws java.io.IOException
Creates a socket and connects it to the specified remote host on the specified remote port. The socket will also be bound to the local address and port supplied. This socket is configured using the socket options established for this factory. The properties used to create the SSL socket are based upon the what was passed into the SSLSocketFactory constructor.
createSocket
in class javax.net.SocketFactory
java.io.IOException
createSocket
- public java.net.Socket createSocket( java.lang.String host,
- int port)
- throws java.io.IOException
- java.net.UnknownHostException
Creates a socket and connects it to the specified remote host at the specified remote port. This socket is configured using the socket options established for this factory. The properties used to create the SSL socket are based upon the what was passed into the SSLSocketFactory constructor.
createSocket
in class javax.net.SocketFactory
java.io.IOException
java.net.UnknownHostException
createSocket
- public java.net.Socket createSocket( java.lang.String host,
- int port,
- java.net.InetAddress localHost,
- int localPort)
- throws java.io.IOException
- java.net.UnknownHostException
Creates a socket and connects it to the specified remote host on the specified remote port. The socket will also be bound to the local address and port supplied. This socket is configured using the socket options established for this factory. The properties used to create the SSL socket are based upon the what was passed into the SSLSocketFactory constructor.
createSocket
in class javax.net.SocketFactory
java.io.IOException
java.net.UnknownHostException
This is the default constructor which will retrieve the default SSL configuration for creating Sockets. It first tries to find the javax.net.ssl.* properties and if not present will choose the default SSL configuration.