public class JSSESocketFactory extends java.lang.Object implements LDAPTLSSocketFactory, java.io.Serializable
LDAPSocketFactory
interface.
Modifier and Type | Field and Description |
---|---|
protected javax.net.ssl.SSLSocketFactory |
factory |
protected java.lang.String[] |
suites |
Constructor and Description |
---|
JSSESocketFactory()
Default factory constructor
|
JSSESocketFactory(javax.net.ssl.SSLSocketFactory factory)
Factory constructor
|
JSSESocketFactory(java.lang.String[] suites)
Factory constructor
|
JSSESocketFactory(java.lang.String[] suites,
javax.net.ssl.SSLSocketFactory factory)
Factory constructor
|
Modifier and Type | Method and Description |
---|---|
java.net.Socket |
makeSocket(java.net.Socket s)
Creates an SSL socket layered over an existing socket.
|
java.net.Socket |
makeSocket(java.lang.String host,
int port)
Creates an SSL socket.
|
protected javax.net.ssl.SSLSocketFactory factory
protected java.lang.String[] suites
public JSSESocketFactory()
public JSSESocketFactory(java.lang.String[] suites)
suites
- Cipher suites to attempt to use with the server;
if null
, use any cipher suites available in the
JSSE packagepublic JSSESocketFactory(javax.net.ssl.SSLSocketFactory factory)
factory
- the SSL socketfactory to usepublic JSSESocketFactory(java.lang.String[] suites, javax.net.ssl.SSLSocketFactory factory)
suites
- Cipher suites to attempt to use with the server;
if null
, use any cipher suites available in the
JSSE packagefactory
- the SSL socketfactory to usepublic java.net.Socket makeSocket(java.lang.String host, int port) throws LDAPException
makeSocket
in interface LDAPSocketFactory
host
- Host name or IP address of SSL serverport
- Port numbers of SSL serverLDAPException
- on error creating socketLDAPSSLSocketFactory.makeSocket(java.lang.String,int)
public java.net.Socket makeSocket(java.net.Socket s) throws LDAPException
makeSocket
in interface LDAPTLSSocketFactory
s
- An existing non-SSL socketLDAPException
- on error creating socketLDAPConnection.startTLS()