Class AbstractLdapConnection
java.lang.Object
org.apache.mina.core.service.IoHandlerAdapter
org.apache.directory.ldap.client.api.AbstractLdapConnection
- All Implemented Interfaces:
Closeable, AutoCloseable, LdapConnection, org.apache.mina.core.service.IoHandler
- Direct Known Subclasses:
LdapNetworkConnection
public abstract class AbstractLdapConnection
extends org.apache.mina.core.service.IoHandlerAdapter
implements LdapConnection
An abstract LdapConnection class gathering the common behavior of LdapConnection
concrete classes.
- Author:
- Apache Directory Project
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected org.apache.directory.api.ldap.codec.api.LdapApiServicethe ldap codec serviceprotected AtomicIntegerA Message ID which is incremented for each operationprotected org.apache.directory.api.ldap.model.schema.SchemaManagerthe schema manager -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCreates a new instance of an AbstractLdapConnectionprotectedAbstractLdapConnection(org.apache.directory.api.ldap.codec.api.LdapApiService codec) Creates a new instance of and AbstractLdapConnection.java, with a LdapApiService instance/ -
Method Summary
Modifier and TypeMethodDescriptionvoidUnauthenticated authentication bind on a server.voidSimple bind on a server.voidbind(org.apache.directory.api.ldap.model.name.Dn name) Unauthenticated authentication bind on a server.voidSimple bind on a server.protected org.apache.directory.api.ldap.model.message.BindRequestcreateBindRequest(String name, byte[] credentials, String saslMechanism, org.apache.directory.api.ldap.model.message.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, sessionOpenedMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface 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 Details
-
schemaManager
protected org.apache.directory.api.ldap.model.schema.SchemaManager schemaManagerthe schema manager -
messageId
A Message ID which is incremented for each operation -
codec
protected org.apache.directory.api.ldap.codec.api.LdapApiService codecthe ldap codec service
-
-
Constructor Details
-
AbstractLdapConnection
protected AbstractLdapConnection()Creates a new instance of an AbstractLdapConnection -
AbstractLdapConnection
protected AbstractLdapConnection(org.apache.directory.api.ldap.codec.api.LdapApiService codec) Creates a new instance of and AbstractLdapConnection.java, with a LdapApiService instance/- Parameters:
codec- The LdapApiService instance to use
-
-
Method Details
-
bind
public void bind(org.apache.directory.api.ldap.model.name.Dn name) throws org.apache.directory.api.ldap.model.exception.LdapException Unauthenticated authentication bind on a server.- Specified by:
bindin interfaceLdapConnection- Parameters:
name- The name used to authenticate the user.- Throws:
org.apache.directory.api.ldap.model.exception.LdapException- if some error occurred
-
bind
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:
org.apache.directory.api.ldap.model.exception.LdapException- if some error occurred
-
bind
public void bind(String name, String credentials) throws org.apache.directory.api.ldap.model.exception.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:
org.apache.directory.api.ldap.model.exception.LdapException- if some error occurred
-
bind
public void bind(org.apache.directory.api.ldap.model.name.Dn name, String credentials) throws org.apache.directory.api.ldap.model.exception.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:
org.apache.directory.api.ldap.model.exception.LdapException- if some error occurred
-
createBindRequest
protected org.apache.directory.api.ldap.model.message.BindRequest createBindRequest(String name, byte[] credentials, String saslMechanism, org.apache.directory.api.ldap.model.message.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
-