org.apache.directory.ldap.client.api
Class AbstractLdapConnection

java.lang.Object
  extended by org.apache.mina.core.service.IoHandlerAdapter
      extended by org.apache.directory.ldap.client.api.AbstractLdapConnection
All Implemented Interfaces:
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
protected  org.apache.directory.api.ldap.codec.api.LdapApiService codec
          the ldap codec service
protected  AtomicInteger messageId
          A Message ID which is incremented for each operation
protected  org.apache.directory.api.ldap.model.schema.SchemaManager schemaManager
          the schema manager
 
Constructor Summary
protected AbstractLdapConnection()
          Creates a new instance of an AbstractLdapConnection
 
Method Summary
 void bind(org.apache.directory.api.ldap.model.name.Dn name)
          Unauthenticated authentication Bind on a server.
 void bind(org.apache.directory.api.ldap.model.name.Dn name, String credentials)
          Simple Bind on a server.
 void bind(String name)
          Unauthenticated authentication bind
 void bind(String name, String credentials)
          Simple Bind on a server.
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.
 
Methods inherited from class org.apache.mina.core.service.IoHandlerAdapter
exceptionCaught, 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, close, compare, compare, compare, compare, compare, compare, compare, connect, delete, delete, delete, doesFutureExistFor, exists, exists, extended, extended, extended, extended, extended, getBinaryAttributeDetector, getCodecService, getRootDse, getRootDse, getSchemaManager, getSupportedControls, isAuthenticated, isConnected, isControlSupported, loadSchema, 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, setTimeOut, unBind
 

Field Detail

schemaManager

protected org.apache.directory.api.ldap.model.schema.SchemaManager schemaManager
the schema manager


messageId

protected AtomicInteger messageId
A Message ID which is incremented for each operation


codec

protected org.apache.directory.api.ldap.codec.api.LdapApiService codec
the ldap codec service

Constructor Detail

AbstractLdapConnection

protected AbstractLdapConnection()
Creates a new instance of an AbstractLdapConnection

Method Detail

bind

public void bind(org.apache.directory.api.ldap.model.name.Dn name)
          throws org.apache.directory.api.ldap.model.exception.LdapException,
                 IOException
Unauthenticated authentication Bind on a server.

Specified by:
bind in interface LdapConnection
Parameters:
name - The name we use to authenticate the user. It must be a valid Dn
Throws:
IOException - if an I/O exception occurred
org.apache.directory.api.ldap.model.exception.LdapException

bind

public void bind(String name)
          throws org.apache.directory.api.ldap.model.exception.LdapException,
                 IOException
Unauthenticated authentication bind

Specified by:
bind in interface LdapConnection
Parameters:
name - The name we use to authenticate the user. It must be a valid Dn
Throws:
IOException - if an I/O exception occurred
org.apache.directory.api.ldap.model.exception.LdapException

bind

public void bind(String name,
                 String credentials)
          throws org.apache.directory.api.ldap.model.exception.LdapException,
                 IOException
Simple Bind on a server.

Specified by:
bind in interface LdapConnection
Parameters:
name - The name we use to authenticate the user. It must be a valid Dn
credentials - The password. It can't be null
Throws:
IOException - if an I/O exception occurred
org.apache.directory.api.ldap.model.exception.LdapException

bind

public void bind(org.apache.directory.api.ldap.model.name.Dn name,
                 String credentials)
          throws org.apache.directory.api.ldap.model.exception.LdapException,
                 IOException
Simple Bind on a server.

Specified by:
bind in interface LdapConnection
Parameters:
name - The name we use to authenticate the user. It must be a valid Dn
credentials - The password. It can't be null
Throws:
IOException - if an I/O exception occurred
org.apache.directory.api.ldap.model.exception.LdapException

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)
                                                                             throws org.apache.directory.api.ldap.model.exception.LdapException
Create a complete BindRequest ready to be sent.

Throws:
org.apache.directory.api.ldap.model.exception.LdapException


Copyright © 2009-2013 The Apache Software Foundation. All Rights Reserved.