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
An abstract connection whose synchronous methods are implemented in terms of
asynchronous methods.
-
Constructor Summary
ModifierConstructorDescriptionprotected
Creates a new abstract asynchronous connection. -
Method Summary
Modifier and TypeMethodDescriptionadd
(AddRequest request) Adds an entry to the Directory Server using the provided add request.bind
(BindRequest request) Authenticates to the Directory Server using the provided bind request.compare
(CompareRequest request) Compares an entry in the Directory Server using the provided compare request.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.modify
(ModifyRequest request) Modifies an entry in the Directory Server using the provided modify request.modifyDn
(ModifyDnRequest request) Renames an entry in the Directory Server using the provided modify DN request.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
-
Constructor Details
-
AbstractAsynchronousConnection
protected AbstractAsynchronousConnection()Creates a new abstract asynchronous connection.
-
-
Method Details
-
add
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
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
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
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
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
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
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.
-