LDAP Classes
Implements Java LDAP

com.novell.ldap
Interface LDAPSocketFactory

All Known Subinterfaces:
LDAPTLSSocketFactory
All Known Implementing Classes:
LDAPJSSESecureSocketFactory, LDAPJSSEStartTLSFactory, LDAPSecureSocketFactory

public interface LDAPSocketFactory

Used to construct sockets used in LDAPConnection.

This factory produces sockets that are to be used in an LDAPConnection. Programmers needing to provide or use specialized socket connections, including sockets based on Transport Layer Security (TLS) can implement this interface. An implementation of this interface may, for example, provide a TLSSocket connected to a secure server.

An implementation of this factory can be set per connection or globally for all connections.

See Also:
LDAPConnection.LDAPConnection(LDAPSocketFactory), LDAPConnection.setSocketFactory(com.novell.ldap.LDAPSocketFactory)

Method Summary
 java.net.Socket createSocket(java.lang.String host, int port)
          Returns a socket connected using the provided host name and port number.
 

Method Detail

createSocket

public java.net.Socket createSocket(java.lang.String host,
                                    int port)
                             throws java.io.IOException,
                                    java.net.UnknownHostException
Returns a socket connected using the provided host name and port number.

This method is called in the constructor of LDAPConnection and the resulting socket will be used for the duration of the connection.

Parameters:
host - The host name or a dotted string representing the IP address of the LDAP server to which you want to connect.

port - The TCP or UDP port number to connect to or contact. The default LDAP port is 389.
Returns:
the new Socket
Throws:
java.io.IOException - The socket to the specified host and port could not be created.
java.net.UnknownHostException - The specified host could not be found.

LDAP Classes
Implements Java LDAP

Copyright © 2002 Novell, Inc. All Rights Reserved.
Novell, Inc.
1800 South Novell Place
Provo, Ut 84606
Phone: (801) 861-5000