Package netscape.ldap.factory
Class JSSESocketFactory
java.lang.Object
netscape.ldap.factory.JSSESocketFactory
- All Implemented Interfaces:
Serializable
,LDAPSocketFactory
,LDAPTLSSocketFactory
Creates an SSL socket connection to a server, using the JSSE package
from Sun. This class implements the
LDAPSocketFactory
interface.
- Version:
- 1.0
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionDefault factory constructorJSSESocketFactory
(String[] suites) Factory constructorJSSESocketFactory
(String[] suites, SSLSocketFactory factory) Factory constructorJSSESocketFactory
(SSLSocketFactory factory) Factory constructor -
Method Summary
Modifier and TypeMethodDescriptionmakeSocket
(String host, int port) Creates an SSL socket.makeSocket
(Socket s) Creates an SSL socket layered over an existing socket.
-
Field Details
-
factory
-
suites
-
-
Constructor Details
-
JSSESocketFactory
public JSSESocketFactory()Default factory constructor -
JSSESocketFactory
Factory constructor- Parameters:
suites
- Cipher suites to attempt to use with the server; ifnull
, use any cipher suites available in the JSSE package
-
JSSESocketFactory
Factory constructor- Parameters:
factory
- the SSL socketfactory to use
-
JSSESocketFactory
Factory constructor- Parameters:
suites
- Cipher suites to attempt to use with the server; ifnull
, use any cipher suites available in the JSSE packagefactory
- the SSL socketfactory to use
-
-
Method Details
-
makeSocket
Creates an SSL socket.- Specified by:
makeSocket
in interfaceLDAPSocketFactory
- Parameters:
host
- Host name or IP address of SSL serverport
- Port numbers of SSL server- Returns:
- A socket for an encrypted session
- Throws:
LDAPException
- on error creating socket- See Also:
-
makeSocket
Creates an SSL socket layered over an existing socket. Used for the startTLS implementation (RFC2830).- Specified by:
makeSocket
in interfaceLDAPTLSSocketFactory
- Parameters:
s
- An existing non-SSL socket- Returns:
- A SSL socket layered over the input socket
- Throws:
LDAPException
- on error creating socket- Since:
- LDAPJDK 4.17
- See Also:
-