|
BEA Systems, Inc. | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--javax.net.SocketFactory | +--weblogic.security.SSL.SSLSocketFactory
Delegates to SSLSocketFactory requests to create SSL sockets.
Note: This SSLSocketFactory cannot be plugged into JSSE because the
getDefault()
method used by JSSE returns an instance initialized
to use the old Phaos SSL implementation, instead of the Certicom
SSL implementation currently used by the server. The Phaos
implementation does not allow you to configure the trusted certificates,
while Certicom's would be configured according to the server SSL
trust configuration. If you really need to access the Certicom
implementation from JSSE, you can extend
the javax.net.SocketFactory
class and implement its getDefault()
method to return
an instance of your class that wraps the SocketFactory instance returned by
the weblogic.security.SSL.SSLSocketFactory.getDefaultJSSE()
method.
The following code example shows how to extend the javax.net.SocketFactory
class to access the Certicom
implementation from JSSE:
public class MySSLSocketFactory extends javax.net.SocketFactory {
private static MySSLSocketFactory defFactory;
private javax.net.SocketFactory factory;
private MySSLSocketFactory() {
factory = weblogic.security.SSL.SSLSocketFactory.getDefaultJSSE();
}
public static javax.net.SocketFactory getDefault() {
if (defFactory == null) defFactory = new MySSLSocketFactory();
return defFactory;
}
public Socket createSocket(InetAddress host, int port) throws IOException {
return factory.createSocket(host, port);
}
// implement the other three abstract createSocket methods the same way
...
}
Method Summary | |
java.net.Socket |
createSocket(java.net.InetAddress address,
int port)
Returns a socket connected to a ServerSocket at the specified network address and port. |
java.net.Socket |
createSocket(java.net.InetAddress address,
int port,
java.net.InetAddress clientAddress,
int clientPort)
Returns a socket connected to a ServerSocket at the specified network address and port. |
java.net.Socket |
createSocket(java.net.Socket socket,
java.lang.String host,
int port,
boolean autoClose)
Returns a socket layered over an existing socket to a ServerSocket on the named host, at the given port. |
java.net.Socket |
createSocket(java.lang.String host,
int port)
Returns a socket connected to a ServerSocket on the named host, at the given port. |
java.net.Socket |
createSocket(java.lang.String host,
int port,
java.net.InetAddress clientAddress,
int clientPort)
Returns a socket connected to a ServerSocket on the named host, at the given port. |
static javax.net.SocketFactory |
getDefault()
Deprecated. Deprecated in WebLogic Server 7.0. This method returns the legacy SSLSocketFactory so use the getDefaultJSSE() method instead. |
java.lang.String[] |
getDefaultCipherSuites()
Returns the list of cipher suites which are enabled by default. |
static javax.net.SocketFactory |
getDefaultJSSE()
Returns the default SSL socket factory. |
java.lang.String[] |
getSupportedCipherSuites()
Returns the names of the cipher suites which could be enabled for use on an SSL connection. |
Methods inherited from class javax.net.SocketFactory |
createSocket |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Method Detail |
public static javax.net.SocketFactory getDefault()
public static javax.net.SocketFactory getDefaultJSSE()
public java.net.Socket createSocket(java.net.Socket socket, java.lang.String host, int port, boolean autoClose) throws java.net.UnknownHostException, java.io.IOException
socket
- the existing sockethost
- the server hostport
- the server portautoClose
- close the underlying socket when this socket is closedpublic java.net.Socket createSocket(java.lang.String host, int port) throws java.net.UnknownHostException, java.io.IOException
host
- the server hostport
- the server portpublic java.net.Socket createSocket(java.net.InetAddress address, int port) throws java.net.UnknownHostException, java.io.IOException
address
- the server network addressport
- the server portpublic java.net.Socket createSocket(java.lang.String host, int port, java.net.InetAddress clientAddress, int clientPort) throws java.net.UnknownHostException, java.io.IOException
host
- the server hostport
- the server portclientAddress
- the client network addressclientPort
- the client portpublic java.net.Socket createSocket(java.net.InetAddress address, int port, java.net.InetAddress clientAddress, int clientPort) throws java.net.UnknownHostException, java.io.IOException
address
- the server network addressport
- the server portclientAddress
- the client network addressclientPort
- the client portpublic java.lang.String[] getDefaultCipherSuites()
getSupportedCipherSuites()
public java.lang.String[] getSupportedCipherSuites()
|
Documentation is available at http://download.oracle.com/docs/cd/E13222_01/wls/docs81 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |