netscape.ldap.factory
Class JSSESocketFactory
java.lang.Object
netscape.ldap.factory.JSSESocketFactory
- LDAPSocketFactory, LDAPTLSSocketFactory, java.io.Serializable
public class JSSESocketFactory
extends java.lang.Object
Creates an SSL socket connection to a server, using the JSSE package
from Sun. This class implements the
LDAPSocketFactory
interface.
LDAPSocketFactory
, LDAPConnection.LDAPConnection(LDAPSocketFactory)
, Serialized Form
JSSESocketFactory() - Default factory constructor
|
JSSESocketFactory(String[] suites) - Factory constructor that uses the default JSSE SSLSocketFactory
|
JSSESocketFactory(String[] suites, SSLSocketFactory factory) - Factory constructor that provides an explicit SSLSocketFactory.
|
Socket | makeSocket(Socket s) - Creates an SSL socket layered over an existing socket.
|
Socket | makeSocket(String host, int port) - Creates an SSL socket.
|
factory
protected SSLSocketFactory factory
suites
protected String[] suites
JSSESocketFactory
public JSSESocketFactory()
Default factory constructor
JSSESocketFactory
public JSSESocketFactory(String[] suites)
Factory constructor that uses the default JSSE SSLSocketFactory
suites
- Cipher suites to attempt to use with the server;
if null
, use any cipher suites available in the
JSSE package
JSSESocketFactory
public JSSESocketFactory(String[] suites,
SSLSocketFactory factory)
Factory constructor that provides an explicit SSLSocketFactory.
suites
- Cipher suites to attempt to use with the server;
if null
, use any cipher suites available in the
JSSE packagefactory
- the specific SSL server socket factory to use
makeSocket
public Socket makeSocket(Socket s)
throws LDAPException
Creates an SSL socket layered over an existing socket.
Used for the startTLS implementation (RFC2830).
- makeSocket in interface LDAPTLSSocketFactory
s
- An existing non-SSL socket
- A SSL socket layered over the input socket
LDAPException
- on error creating socket
- LDAPJDK 4.17
makeSocket
public Socket makeSocket(String host,
int port)
throws LDAPException
Creates an SSL socket.
- makeSocket in interface LDAPSocketFactory
host
- Host name or IP address of SSL serverport
- Port numbers of SSL server
- A socket for an encrypted session
LDAPException
- on error creating socket