Package org.forgerock.opendj.ldap
Class AbstractAsynchronousConnection
- java.lang.Object
-
- org.forgerock.opendj.ldap.AbstractConnection
-
- org.forgerock.opendj.ldap.AbstractAsynchronousConnection
-
- All Implemented Interfaces:
Closeable
,AutoCloseable
,Connection
public abstract class AbstractAsynchronousConnection extends AbstractConnection
An abstract connection whose synchronous methods are implemented in terms of asynchronous methods.
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractAsynchronousConnection()
Creates a new abstract asynchronous connection.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Result
add(AddRequest request)
Adds an entry to the Directory Server using the provided add request.BindResult
bind(BindRequest request)
Authenticates to the Directory Server using the provided bind request.CompareResult
compare(CompareRequest request)
Compares an entry in the Directory Server using the provided compare request.Result
delete(DeleteRequest request)
Deletes an entry from the Directory Server using the provided delete request.<R extends ExtendedResult>
RextendedRequest(ExtendedRequest<R> request, IntermediateResponseHandler handler)
Requests that the Directory Server performs the provided extended request, optionally listening for any intermediate responses.Result
modify(ModifyRequest request)
Modifies an entry in the Directory Server using the provided modify request.Result
modifyDn(ModifyDnRequest request)
Renames an entry in the Directory Server using the provided modify DN request.Result
search(SearchRequest request, SearchResultHandler handler)
Searches the Directory Server using the provided search request.-
Methods inherited from class org.forgerock.opendj.ldap.AbstractConnection
add, add, addAsync, applyChange, applyChangeAsync, applyChangeAsync, bind, bindAsync, close, compare, compareAsync, delete, deleteAsync, deleteSubtree, extendedRequest, extendedRequest, extendedRequestAsync, modify, modifyAsync, modifyDn, modifyDnAsync, readEntry, readEntry, readEntryAsync, search, search, search, search, searchAsync, searchSingleEntry, searchSingleEntry, searchSingleEntryAsync, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.forgerock.opendj.ldap.Connection
abandonAsync, addAsync, addConnectionEventListener, bindAsync, close, compareAsync, delete, deleteAsync, extendedRequestAsync, isClosed, isValid, modifyAsync, modifyDnAsync, removeConnectionEventListener, searchAsync
-
-
-
-
Method Detail
-
add
public Result add(AddRequest request) throws LdapException
Description copied from interface:Connection
Adds an entry to the Directory Server using the provided add request.- Parameters:
request
- The add request.- Returns:
- The result of the operation.
- Throws:
LdapException
- If the result code indicates that the request failed for some reason.
-
bind
public BindResult bind(BindRequest request) throws LdapException
Description copied from interface:Connection
Authenticates to the Directory Server using the provided bind request.- Parameters:
request
- The bind request.- Returns:
- The result of the operation.
- Throws:
LdapException
- If the result code indicates that the request failed for some reason.
-
compare
public CompareResult compare(CompareRequest request) throws LdapException
Description copied from interface:Connection
Compares an entry in the Directory Server using the provided compare request.- Parameters:
request
- The compare request.- Returns:
- The result of the operation.
- Throws:
LdapException
- If the result code indicates that the request failed for some reason.
-
delete
public Result delete(DeleteRequest request) throws LdapException
Description copied from interface:Connection
Deletes an entry from the Directory Server using the provided delete request.- Parameters:
request
- The delete request.- Returns:
- The result of the operation.
- Throws:
LdapException
- If the result code indicates that the request failed for some reason.
-
extendedRequest
public <R extends ExtendedResult> R extendedRequest(ExtendedRequest<R> request, IntermediateResponseHandler handler) throws LdapException
Description copied from interface:Connection
Requests that the Directory Server performs the provided extended request, optionally listening for any intermediate responses.- Type Parameters:
R
- The type of result returned by the extended request.- Parameters:
request
- The extended request.handler
- An intermediate response handler which can be used to process any intermediate responses as they are received, may benull
.- Returns:
- The result of the operation.
- Throws:
LdapException
- If the result code indicates that the request failed for some reason.
-
modify
public Result modify(ModifyRequest request) throws LdapException
Description copied from interface:Connection
Modifies an entry in the Directory Server using the provided modify request.- Parameters:
request
- The modify request.- Returns:
- The result of the operation.
- Throws:
LdapException
- If the result code indicates that the request failed for some reason.
-
modifyDn
public Result modifyDn(ModifyDnRequest request) throws LdapException
Description copied from interface:Connection
Renames an entry in the Directory Server using the provided modify DN request.- Parameters:
request
- The modify DN request.- Returns:
- The result of the operation.
- Throws:
LdapException
- If the result code indicates that the request failed for some reason.
-
search
public Result search(SearchRequest request, SearchResultHandler handler) throws LdapException
Description copied from interface:Connection
Searches the Directory Server using the provided search request. Any matching entries returned by the search as well as any search result references will be passed to the provided search result handler.- Parameters:
request
- The search request.handler
- A search result handler which can be used to process the search result entries and references as they are received, may benull
.- Returns:
- The result of the operation.
- Throws:
LdapException
- If the result code indicates that the request failed for some reason.
-
-