BEA Systems, Inc.

BEA WebLogic Server 9.1 API Reference


weblogic.security.SSL
Class SSLSocketFactory

java.lang.Object
  extended byjavax.net.SocketFactory
      extended byweblogic.security.SSL.SSLSocketFactory

public class SSLSocketFactory
extends SocketFactory

Delegates to SSLSocketFactory requests to create SSL sockets.

Copyright © 2005 BEA Systems, Inc. All Rights Reserved.

Constructor Summary
SSLSocketFactory()
          Creates SSLSocketFactory using default configuration.
 
Method Summary
 Socket createSocket(InetAddress address, int port)
          Returns a socket connected to a ServerSocket at the specified network address and port.
 Socket createSocket(InetAddress address, int port, InetAddress clientAddress, int clientPort)
          Returns a socket connected to a ServerSocket at the specified network address and port.
 Socket createSocket(Socket socket, 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.
 Socket createSocket(String host, int port)
          Returns a socket connected to a ServerSocket on the named host, at the given port.
 Socket createSocket(String host, int port, InetAddress clientAddress, int clientPort)
          Returns a socket connected to a ServerSocket on the named host, at the given port.
static SocketFactory getDefault()
          Returns the default SSL socket factory.
 String[] getDefaultCipherSuites()
          Returns the list of cipher suites which are enabled by default.
static SocketFactory getDefaultJSSE()
          Deprecated. WLS 9.0 (04/2003) Replaced by getDefault()
 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
 

Constructor Detail

SSLSocketFactory

public SSLSocketFactory()
Creates SSLSocketFactory using default configuration.

Method Detail

createSocket

public Socket createSocket(InetAddress address,
                           int port)
                    throws UnknownHostException,
                           IOException
Returns a socket connected to a ServerSocket at the specified network address and port. This socket is configured using the socket options established for this factory.

Parameters:
address - the server network address
port - the server port
Throws:
IOException - if the connection can't be established
UnknownHostException - if the host is not known

createSocket

public Socket createSocket(InetAddress address,
                           int port,
                           InetAddress clientAddress,
                           int clientPort)
                    throws UnknownHostException,
                           IOException
Returns a socket connected to a ServerSocket at the specified network address and port. The client is bound to the specified network address and port, and the socket is configured using the socket options established for this factory.

Parameters:
address - the server network address
port - the server port
clientAddress - the client network address
clientPort - the client port
Throws:
IOException - if the connection can't be established
UnknownHostException - if the host is not known

createSocket

public Socket createSocket(Socket socket,
                           String host,
                           int port,
                           boolean autoClose)
                    throws UnknownHostException,
                           IOException
Returns a socket layered over an existing socket to a ServerSocket on the named host, at the given port. This constructor can be used when tunneling SSL through a proxy. The host and port refer to the logical destination server. This socket is configured using the socket options established for this factory.

Parameters:
socket - the existing socket
host - the server host
port - the server port
autoClose - close the underlying socket when this socket is closed
Throws:
IOException - if the connection can't be established
UnknownHostException - if the host is not known

createSocket

public Socket createSocket(String host,
                           int port)
                    throws UnknownHostException,
                           IOException
Returns a socket connected to a ServerSocket on the named host, at the given port. This socket is configured using the socket options established for this factory.

Parameters:
host - the server host
port - the server port
Throws:
IOException - if the connection can't be established
UnknownHostException - if the host is not known

createSocket

public Socket createSocket(String host,
                           int port,
                           InetAddress clientAddress,
                           int clientPort)
                    throws UnknownHostException,
                           IOException
Returns a socket connected to a ServerSocket on the named host, at the given port. The client is bound to the specified network address and port, and the socket is configured using the socket options established for this factory.

Parameters:
host - the server host
port - the server port
clientAddress - the client network address
clientPort - the client port
Throws:
IOException - if the connection can't be established
UnknownHostException - if the host is not known

getDefault

public static SocketFactory getDefault()
Returns the default SSL socket factory.


getDefaultCipherSuites

public String[] getDefaultCipherSuites()
Returns the list of cipher suites which are enabled by default. Unless a different list is enabled, handshaking on an SSL connection will use one of these cipher suites. The minimum quality of service for these defaults requires confidentiality protection and server authentication.

Returns:
array of the cipher suites enabled by default
See Also:
getSupportedCipherSuites()

getDefaultJSSE

public static SocketFactory getDefaultJSSE()
Deprecated. WLS 9.0 (04/2003) Replaced by getDefault()

Returns the default SSL socket factory.


getSupportedCipherSuites

public String[] getSupportedCipherSuites()
Returns the names of the cipher suites which could be enabled for use on an SSL connection. Normally, only a subset of these will actually be enabled by default, since this list may include cipher suites which do not meet quality of service requirements for those defaults. Such cipher suites are useful in specialized applications.

Returns:
an array of cipher suite names

Documentation is available at
http://download.oracle.com/docs/cd/E13222_01/wls/docs91
Copyright 2005 BEA Systems Inc.