|
IBM WebSphere Application ServerTM Release 7 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.net.SocketFactory
javax.net.ssl.SSLSocketFactory
com.ibm.websphere.ssl.protocol.SSLSocketFactory
public class 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.
JSSEHelper
Field Summary | |
---|---|
protected boolean |
default_constructor
|
protected java.util.Properties |
props
|
Constructor Summary | |
---|---|
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 | |
---|---|
java.net.Socket |
createSocket()
Creates an unconnected socket. |
java.net.Socket |
createSocket(java.net.InetAddress host,
int port)
Creates a socket and connects it to the specified port number at the specified address. |
java.net.Socket |
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. |
java.net.Socket |
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. |
java.net.Socket |
createSocket(java.lang.String host,
int port)
Creates a socket and connects it to the specified remote host at the specified remote port. |
java.net.Socket |
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. |
static javax.net.SocketFactory |
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.util.Properties props
protected boolean default_constructor
Constructor Detail |
---|
public SSLSocketFactory()
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.
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.
String
- aliaspublic SSLSocketFactory(java.util.Properties sslprops)
This constructor allows you to pass in a set of SSL properties used for creating Sockets.
java.util.Properties
- sslpropspublic 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.).
String
- aliasjava.util.Map
- connectionInfoJSSEHelper
Method Detail |
---|
public static javax.net.SocketFactory 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.SSLSocketFactory
public java.lang.String[] getSupportedCipherSuites()
getSupportedCipherSuites
in class javax.net.ssl.SSLSocketFactory
public java.net.Socket createSocket() throws java.io.IOException
Creates an unconnected socket.
createSocket
in class javax.net.SocketFactory
java.io.IOException
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.net.Socket
- s - existing socketString
- host - target hostint
- port - target portboolean
- autoClose - close the underlying socket when this socket is closed
java.io.IOException
java.net.UnknownHostException
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
InetAddress
- host - target hostint
- port - target port
java.io.IOException
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
InetAddress
- host - target hostint
- port - target portInetAddress
- localAddress - local hostint
- localPort - local port
java.io.IOException
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
InetAddress
- host - target hostint
- port - target portInetAddress
- localAddress - local hostint
- localPort - local port
java.io.IOException
java.net.UnknownHostException
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
String
- host - target hostint
- port - target portInetAddress
- localAddress - local hostint
- localPort - local port
java.io.IOException
java.net.UnknownHostException
|
IBM WebSphere Application ServerTM Release 7 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |