Class AbstractLdapConnection
- java.lang.Object
-
- org.apache.mina.core.service.IoHandlerAdapter
-
- org.apache.directory.ldap.client.api.AbstractLdapConnection
-
- All Implemented Interfaces:
Closeable,AutoCloseable,LdapConnection,IoHandler
- Direct Known Subclasses:
LdapNetworkConnection
public abstract class AbstractLdapConnection extends IoHandlerAdapter implements LdapConnection
An abstract LdapConnection class gathering the common behavior of LdapConnection concrete classes.- Author:
- Apache Directory Project
-
-
Field Summary
Fields Modifier and Type Field Description protected LdapApiServicecodecthe ldap codec serviceprotected AtomicIntegermessageIdA Message ID which is incremented for each operationprotected SchemaManagerschemaManagerthe schema manager
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractLdapConnection()Creates a new instance of an AbstractLdapConnectionprotectedAbstractLdapConnection(LdapApiService codec)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidbind(String name)Unauthenticated authentication bind on a server.voidbind(String name, String credentials)Simple bind on a server.voidbind(Dn name)Unauthenticated authentication bind on a server.voidbind(Dn name, String credentials)Simple bind on a server.protected BindRequestcreateBindRequest(String name, byte[] credentials, String saslMechanism, Control... controls)Create a complete BindRequest ready to be sent.-
Methods inherited from class org.apache.mina.core.service.IoHandlerAdapter
event, exceptionCaught, inputClosed, messageReceived, messageSent, sessionClosed, sessionCreated, sessionIdle, sessionOpened
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.directory.ldap.client.api.LdapConnection
abandon, abandon, add, add, anonymousBind, bind, bind, bind, close, compare, compare, compare, compare, compare, compare, compare, connect, delete, delete, delete, doesFutureExistFor, exceptionCaught, exists, exists, extended, extended, extended, extended, extended, getBinaryAttributeDetector, getCodecService, getRootDse, getRootDse, getSchemaManager, getSupportedControls, isAuthenticated, isConnected, isControlSupported, isRequestCompleted, loadSchema, loadSchemaRelaxed, lookup, lookup, lookup, lookup, lookup, lookup, modify, modify, modify, modify, modifyDn, move, move, moveAndRename, moveAndRename, moveAndRename, moveAndRename, rename, rename, rename, rename, search, search, search, setBinaryAttributeDetector, setSchemaManager, setTimeOut, unBind
-
-
-
-
Field Detail
-
schemaManager
protected SchemaManager schemaManager
the schema manager
-
messageId
protected AtomicInteger messageId
A Message ID which is incremented for each operation
-
codec
protected LdapApiService codec
the ldap codec service
-
-
Constructor Detail
-
AbstractLdapConnection
protected AbstractLdapConnection()
Creates a new instance of an AbstractLdapConnection
-
AbstractLdapConnection
protected AbstractLdapConnection(LdapApiService codec)
-
-
Method Detail
-
bind
public void bind(Dn name) throws LdapException
Unauthenticated authentication bind on a server.- Specified by:
bindin interfaceLdapConnection- Parameters:
name- The name used to authenticate the user.- Throws:
LdapException- if some error occurred
-
bind
public void bind(String name) throws LdapException
Unauthenticated authentication bind on a server.- Specified by:
bindin interfaceLdapConnection- Parameters:
name- The name used to authenticate the user. It must be a valid distinguished name.- Throws:
LdapException- if some error occurred
-
bind
public void bind(String name, String credentials) throws LdapException
Simple bind on a server.- Specified by:
bindin interfaceLdapConnection- Parameters:
name- The name used to authenticate the user. It must be a valid distinguished name.credentials- The password, it can't benull- Throws:
LdapException- if some error occurred
-
bind
public void bind(Dn name, String credentials) throws LdapException
Simple bind on a server.- Specified by:
bindin interfaceLdapConnection- Parameters:
name- The name used to authenticate the user.credentials- The password, it can't be null- Throws:
LdapException- if some error occurred
-
createBindRequest
protected BindRequest createBindRequest(String name, byte[] credentials, String saslMechanism, Control... controls)
Create a complete BindRequest ready to be sent.- Parameters:
name- The DN to bind withcredentials- The user's passwordsaslMechanism- The SASL mechanism to usecontrols- The controls to send- Returns:
- The created BindRequest
-
-