Package com.netscape.cmscore.ldapconn
Class LdapBoundConnection
java.lang.Object
netscape.ldap.LDAPConnection
com.netscape.cmscore.ldapconn.LdapBoundConnection
- All Implemented Interfaces:
Serializable
,Cloneable
,netscape.ldap.LDAPAsynchronousConnection
,netscape.ldap.LDAPv2
,netscape.ldap.LDAPv3
public class LdapBoundConnection
extends netscape.ldap.LDAPConnection
A LDAP connection that is bound to a server host, port, secure type.
and authentication.
Makes a LDAP connection and authentication when instantiated.
Cannot establish another LDAP connection or authentication after
construction. LDAPConnection connect and authentication methods are
overridden to prevent this.
- See Also:
-
Field Summary
FieldsFields inherited from class netscape.ldap.LDAPConnection
LDAP_PROPERTY_PROTOCOL, LDAP_PROPERTY_SDK, LDAP_PROPERTY_SECURITY, LDAP_VERSION, MAXBACKLOG, NODELAY_PARALLEL, NODELAY_SERIAL, TRACE_PROPERTY
Fields inherited from interface netscape.ldap.LDAPv3
ALL_USER_ATTRS, BATCHSIZE, BIND, CLIENTCONTROLS, DEFAULT_PORT, DEREF, DEREF_ALWAYS, DEREF_FINDING, DEREF_NEVER, DEREF_SEARCHING, NO_ATTRS, PROTOCOL_VERSION, REFERRALS, REFERRALS_HOP_LIMIT, REFERRALS_REBIND_PROC, SCOPE_BASE, SCOPE_ONE, SCOPE_SUB, SERVER_TIMELIMIT, SERVERCONTROLS, SIZELIMIT, TIMELIMIT
-
Constructor Summary
ConstructorsConstructorDescriptionLdapBoundConnection
(String hostname, int port, int version, netscape.ldap.LDAPSocketFactory factory, String bindDN, String bindPassword) Instantiates a connection to a ldap server, secure or non-secure connection with LDAP basic bind DN and password authentication.LdapBoundConnection
(netscape.ldap.LDAPSocketFactory socketFactory, LdapConnInfo connInfo, LdapAuthInfo authInfo) Instantiates a connection to a ldap server, secure or non-secure connection with LDAP basic bind DN and password authentication. -
Method Summary
Modifier and TypeMethodDescriptionvoid
authenticate
(int version, String dn, String pw) Overrides same method in LDAPConnection to do prevent re-authentication.void
authenticate
(String dn, String pw) Overrides same method in LDAPConnection to do prevent re-authentication.void
authenticate
(String dn, String[] mechs, Properties props, Object getter) Overrides same method in LDAPConnection to do prevent re-authentication.void
overrides parent's connect to prevent re-connect.void
overrides parent's connect to prevent re-connect.Methods inherited from class netscape.ldap.LDAPConnection
abandon, abandon, abandon, add, add, add, add, add, authenticate, authenticate, authenticate, authenticate, authenticate, authenticate, authenticate, authenticate, authenticate, authenticate, bind, bind, bind, bind, bind, bind, bind, bind, bind, bind, clone, close, compare, compare, compare, compare, compare, connect, connect, connect, connect, connect, delete, delete, delete, delete, delete, disconnect, extendedOperation, extendedOperation, extendedOperation, finalize, getAuthenticationDN, getAuthenticationMethod, getAuthenticationPassword, getCache, getConnectTimeout, getConnSetupDelay, getConstraints, getHost, getInputStream, getOption, getOutputStream, getPort, getProperty, getResponseControls, getSearchConstraints, getSocketFactory, isAuthenticated, isConnected, isNetscape, isTLS, main, modify, modify, modify, modify, modify, modify, modify, modify, modify, modify, modify, modify, modify, read, read, read, read, read, reconnect, rename, rename, rename, rename, rename, rename, rename, rename, search, search, search, search, search, search, setCache, setConnectTimeout, setConnSetupDelay, setConstraints, setInputStream, setOption, setOutputStream, setProperty, setSearchConstraints, setSocketFactory, startTLS, toString
-
Field Details
-
logger
public static org.slf4j.Logger logger
-
-
Constructor Details
-
LdapBoundConnection
public LdapBoundConnection(netscape.ldap.LDAPSocketFactory socketFactory, LdapConnInfo connInfo, LdapAuthInfo authInfo) throws EBaseException, netscape.ldap.LDAPException Instantiates a connection to a ldap server, secure or non-secure connection with LDAP basic bind DN and password authentication.- Throws:
EBaseException
netscape.ldap.LDAPException
-
LdapBoundConnection
public LdapBoundConnection(String hostname, int port, int version, netscape.ldap.LDAPSocketFactory factory, String bindDN, String bindPassword) throws netscape.ldap.LDAPException Instantiates a connection to a ldap server, secure or non-secure connection with LDAP basic bind DN and password authentication.- Throws:
netscape.ldap.LDAPException
-
-
Method Details
-
authenticate
Overrides same method in LDAPConnection to do prevent re-authentication.- Specified by:
authenticate
in interfacenetscape.ldap.LDAPv3
- Overrides:
authenticate
in classnetscape.ldap.LDAPConnection
- Throws:
netscape.ldap.LDAPException
-
authenticate
Overrides same method in LDAPConnection to do prevent re-authentication.- Specified by:
authenticate
in interfacenetscape.ldap.LDAPv2
- Overrides:
authenticate
in classnetscape.ldap.LDAPConnection
- Throws:
netscape.ldap.LDAPException
-
authenticate
public void authenticate(String dn, String[] mechs, Properties props, Object getter) throws netscape.ldap.LDAPException Overrides same method in LDAPConnection to do prevent re-authentication.- Throws:
netscape.ldap.LDAPException
-
connect
overrides parent's connect to prevent re-connect.- Specified by:
connect
in interfacenetscape.ldap.LDAPv2
- Overrides:
connect
in classnetscape.ldap.LDAPConnection
- Throws:
netscape.ldap.LDAPException
-
connect
public void connect(int version, String host, int port, String dn, String pw) throws netscape.ldap.LDAPException overrides parent's connect to prevent re-connect.- Specified by:
connect
in interfacenetscape.ldap.LDAPv3
- Overrides:
connect
in classnetscape.ldap.LDAPConnection
- Throws:
netscape.ldap.LDAPException
-