Interface LdapAsyncConnection
- All Superinterfaces:
AutoCloseable, Closeable, LdapConnection
- All Known Implementing Classes:
LdapNetworkConnection
Root interface for all asynchronous LDAP connections.
- Author:
- Apache Directory Project
-
Method Summary
Modifier and TypeMethodDescriptionaddAsync(org.apache.directory.api.ldap.model.entry.Entry entry) Add an entry to the server asynchronously.addAsync(org.apache.directory.api.ldap.model.message.AddRequest addRequest) Add an entry present in the AddRequest to the server.Anonymous asynchronous Bind on a server.Asynchronous Bind on a server, using the LdapConnectionConfig informations.Simple asynchronous Bind on a server.bindAsync(org.apache.directory.api.ldap.model.message.BindRequest bindRequest) Do an asynchronous bind, based on a BindRequest.Simple asynchronous Bind on a server.compareAsync(org.apache.directory.api.ldap.model.message.CompareRequest compareRequest) Asynchronously compares an entry's attribute's value with that of the given valueorg.apache.mina.core.future.ConnectFutureDo an asynchronous connection attemptdeleteAsync(org.apache.directory.api.ldap.model.message.DeleteRequest delRequest) Performs an asynchronous delete operation based on the delete request object.extendedAsync(org.apache.directory.api.ldap.model.message.ExtendedRequest extendedRequest) Asynchronously requests the server to perform an extended operation based on the given request.Configuration of LdapNetworkConnectionmodifyAsync(org.apache.directory.api.ldap.model.message.ModifyRequest modRequest) Performs an asynchronous modify operation based on the modifications present in the ModifyRequest.modifyDnAsync(org.apache.directory.api.ldap.model.message.ModifyDnRequest modDnRequest) Performs the modifyDn operation based on the given ModifyDnRequest.searchAsync(String baseDn, String filter, org.apache.directory.api.ldap.model.message.SearchScope scope, String... attributes) Do an asynchronous search, on the base object, using the given filter.searchAsync(org.apache.directory.api.ldap.model.message.SearchRequest searchRequest) Do a search, on the base object, using the given filter.searchAsync(org.apache.directory.api.ldap.model.name.Dn baseDn, String filter, org.apache.directory.api.ldap.model.message.SearchScope scope, String... attributes) Do an asynchronous search, on the base object, using the given filter.Methods inherited from interface LdapConnection
abandon, abandon, add, add, anonymousBind, bind, bind, bind, bind, 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
-
Method Details
-
connectAsync
org.apache.mina.core.future.ConnectFuture connectAsync() throws org.apache.directory.api.ldap.model.exception.LdapExceptionDo an asynchronous connection attempt- Returns:
- the connection's future
- Throws:
org.apache.directory.api.ldap.model.exception.LdapException- if some error occurred
-
addAsync
AddFuture addAsync(org.apache.directory.api.ldap.model.entry.Entry entry) throws org.apache.directory.api.ldap.model.exception.LdapException Add an entry to the server asynchronously. This is a non blocking add : the user has to get for the response from the returned Future.- Parameters:
entry- The entry to add- Returns:
- the add operation's future
- Throws:
org.apache.directory.api.ldap.model.exception.LdapException- if some error occurred
-
addAsync
AddFuture addAsync(org.apache.directory.api.ldap.model.message.AddRequest addRequest) throws org.apache.directory.api.ldap.model.exception.LdapException Add an entry present in the AddRequest to the server.- Parameters:
addRequest- the request object containing an entry and controls(if any)- Returns:
- the add operation's future
- Throws:
org.apache.directory.api.ldap.model.exception.LdapException- if some error occurred
-
bindAsync
BindFuture bindAsync() throws org.apache.directory.api.ldap.model.exception.LdapException, IOExceptionAsynchronous Bind on a server, using the LdapConnectionConfig informations.- Returns:
- the bind operation's future
- Throws:
org.apache.directory.api.ldap.model.exception.LdapException- if some error occurredIOException- if some IO error occurred
-
anonymousBindAsync
BindFuture anonymousBindAsync() throws org.apache.directory.api.ldap.model.exception.LdapException, IOExceptionAnonymous asynchronous Bind on a server.- Returns:
- the bind operation's future
- Throws:
org.apache.directory.api.ldap.model.exception.LdapException- if some error occurredIOException- if some IO error occurred
-
bindAsync
BindFuture bindAsync(String name, String credentials) throws org.apache.directory.api.ldap.model.exception.LdapException, IOException Simple asynchronous Bind on a server.- Parameters:
name- The name we use to authenticate the user, it must be a valid Dncredentials- The password, it can't be null- Returns:
- the bind operation's future
- Throws:
org.apache.directory.api.ldap.model.exception.LdapException- if some error occurredIOException- if some IO error occurred
-
bindAsync
BindFuture bindAsync(org.apache.directory.api.ldap.model.name.Dn name, String credentials) throws org.apache.directory.api.ldap.model.exception.LdapException, IOException Simple asynchronous Bind on a server.- Parameters:
name- The name we use to authenticate the user, it must be a valid Dncredentials- The password, it can't be null- Returns:
- the bind operation's future
- Throws:
org.apache.directory.api.ldap.model.exception.LdapException- if some error occurredIOException- if some IO error occurred
-
bindAsync
BindFuture bindAsync(org.apache.directory.api.ldap.model.message.BindRequest bindRequest) throws org.apache.directory.api.ldap.model.exception.LdapException, IOException Do an asynchronous bind, based on a BindRequest.- Parameters:
bindRequest- The BindRequest to send- Returns:
- the bind operation's future
- Throws:
org.apache.directory.api.ldap.model.exception.LdapException- if some error occurredIOException- if some IO error occurred
-
searchAsync
SearchFuture searchAsync(String baseDn, String filter, org.apache.directory.api.ldap.model.message.SearchScope scope, String... attributes) throws org.apache.directory.api.ldap.model.exception.LdapException Do an asynchronous search, on the base object, using the given filter. The SearchRequest parameters default to :Scope : ONE DerefAlias : ALWAYS SizeLimit : none TimeLimit : none TypesOnly : false Attributes : all the user's attributes. This method is blocking.
- Parameters:
baseDn- The base for the search, it must be a valid Dn, and can't be emtpyfilter- The filter to use for this search, it can't be emptyscope- The search scope : OBJECT, ONELEVEL or SUBTREEattributes- The attributes for this search- Returns:
- the search operation's future
- Throws:
org.apache.directory.api.ldap.model.exception.LdapException- if some error occurred
-
searchAsync
SearchFuture searchAsync(org.apache.directory.api.ldap.model.name.Dn baseDn, String filter, org.apache.directory.api.ldap.model.message.SearchScope scope, String... attributes) throws org.apache.directory.api.ldap.model.exception.LdapException Do an asynchronous search, on the base object, using the given filter. The SearchRequest parameters default to :Scope : ONE DerefAlias : ALWAYS SizeLimit : none TimeLimit : none TypesOnly : false Attributes : all the user's attributes. This method is blocking.
- Parameters:
baseDn- The base for the search, it must be a valid Dn, and can't be emptyfilter- The filter to use for this search, it can't be emptyscope- The search scope : OBJECT, ONELEVEL or SUBTREEattributes- The attributes for this search- Returns:
- the search operation's future
- Throws:
org.apache.directory.api.ldap.model.exception.LdapException- if some error occurred
-
searchAsync
SearchFuture searchAsync(org.apache.directory.api.ldap.model.message.SearchRequest searchRequest) throws org.apache.directory.api.ldap.model.exception.LdapException Do a search, on the base object, using the given filter. The SearchRequest parameters default to :Scope : ONE DerefAlias : ALWAYS SizeLimit : none TimeLimit : none TypesOnly : false Attributes : all the user's attributes. This method is blocking.
- Parameters:
searchRequest- The search request to send to the server- Returns:
- the search operation's future
- Throws:
org.apache.directory.api.ldap.model.exception.LdapException- if some error occurred
-
modifyAsync
ModifyFuture modifyAsync(org.apache.directory.api.ldap.model.message.ModifyRequest modRequest) throws org.apache.directory.api.ldap.model.exception.LdapException Performs an asynchronous modify operation based on the modifications present in the ModifyRequest.- Parameters:
modRequest- the request for modify operation- Returns:
- the modify operation's future
- Throws:
org.apache.directory.api.ldap.model.exception.LdapException- in case of modify operation failure or timeout happens
-
modifyDnAsync
ModifyDnFuture modifyDnAsync(org.apache.directory.api.ldap.model.message.ModifyDnRequest modDnRequest) throws org.apache.directory.api.ldap.model.exception.LdapException Performs the modifyDn operation based on the given ModifyDnRequest.- Parameters:
modDnRequest- the request- Returns:
- modifyDn operation's future
- Throws:
org.apache.directory.api.ldap.model.exception.LdapException- if some error occurred
-
deleteAsync
DeleteFuture deleteAsync(org.apache.directory.api.ldap.model.message.DeleteRequest delRequest) throws org.apache.directory.api.ldap.model.exception.LdapException Performs an asynchronous delete operation based on the delete request object.- Parameters:
delRequest- the delete operation's request- Returns:
- delete operation's future
- Throws:
org.apache.directory.api.ldap.model.exception.LdapException- If the Dn is not valid or if the deletion failed
-
compareAsync
CompareFuture compareAsync(org.apache.directory.api.ldap.model.message.CompareRequest compareRequest) throws org.apache.directory.api.ldap.model.exception.LdapException Asynchronously compares an entry's attribute's value with that of the given value- Parameters:
compareRequest- the CompareRequest which contains the target Dn, attribute name and value- Returns:
- compare operation's future
- Throws:
org.apache.directory.api.ldap.model.exception.LdapException- if some error occurred
-
extendedAsync
ExtendedFuture extendedAsync(org.apache.directory.api.ldap.model.message.ExtendedRequest extendedRequest) throws org.apache.directory.api.ldap.model.exception.LdapException Asynchronously requests the server to perform an extended operation based on the given request.- Parameters:
extendedRequest- the object containing the details of the extended operation to be performed- Returns:
- extended operation's Future
- Throws:
org.apache.directory.api.ldap.model.exception.LdapException- if some error occurred
-
getConfig
LdapConnectionConfig getConfig()Configuration of LdapNetworkConnection- Returns:
- the configuration of the LDAP connection
-