| | |
| | | * <p> |
| | | * Since synchronous operations block the calling thread, the only way to |
| | | * abandon a long running operation is to interrupt the calling thread from |
| | | * another thread. This will cause the calling thread unblock and throw an |
| | | * another thread. This will cause the calling thread unblock and throw a |
| | | * {@link CancelledResultException} whose cause is the underlying |
| | | * {@link InterruptedException}. |
| | | * <p> |
| | | * <h4>Performing operations asynchronously</h4> |
| | |
| | | * @throws ErrorResultException |
| | | * If the result code indicates that the request failed for some |
| | | * reason. |
| | | * @throws InterruptedException |
| | | * If the current thread was interrupted while waiting. |
| | | * @throws UnsupportedOperationException |
| | | * If this connection does not support add operations. |
| | | * @throws IllegalStateException |
| | |
| | | * @throws NullPointerException |
| | | * If {@code request} was {@code null}. |
| | | */ |
| | | Result add(AddRequest request) throws ErrorResultException, InterruptedException; |
| | | Result add(AddRequest request) throws ErrorResultException; |
| | | |
| | | /** |
| | | * Adds the provided entry to the Directory Server. |
| | |
| | | * @throws ErrorResultException |
| | | * If the result code indicates that the request failed for some |
| | | * reason. |
| | | * @throws InterruptedException |
| | | * If the current thread was interrupted while waiting. |
| | | * @throws UnsupportedOperationException |
| | | * If this connection does not support add operations. |
| | | * @throws IllegalStateException |
| | |
| | | * @throws NullPointerException |
| | | * If {@code entry} was {@code null} . |
| | | */ |
| | | Result add(Entry entry) throws ErrorResultException, InterruptedException; |
| | | Result add(Entry entry) throws ErrorResultException; |
| | | |
| | | /** |
| | | * Adds an entry to the Directory Server using the provided lines of LDIF. |
| | |
| | | * @throws ErrorResultException |
| | | * If the result code indicates that the request failed for some |
| | | * reason. |
| | | * @throws InterruptedException |
| | | * If the current thread was interrupted while waiting. |
| | | * @throws UnsupportedOperationException |
| | | * If this connection does not support add operations. |
| | | * @throws LocalizedIllegalArgumentException |
| | |
| | | * @throws NullPointerException |
| | | * If {@code ldifLines} was {@code null} . |
| | | */ |
| | | Result add(String... ldifLines) throws ErrorResultException, InterruptedException; |
| | | Result add(String... ldifLines) throws ErrorResultException; |
| | | |
| | | /** |
| | | * Asynchronously adds an entry to the Directory Server using the provided |
| | |
| | | * @throws ErrorResultException |
| | | * If the result code indicates that the request failed for some |
| | | * reason. |
| | | * @throws InterruptedException |
| | | * If the current thread was interrupted while waiting. |
| | | * @throws UnsupportedOperationException |
| | | * If this connection does not support bind operations. |
| | | * @throws IllegalStateException |
| | |
| | | * @throws NullPointerException |
| | | * If {@code request} was {@code null}. |
| | | */ |
| | | BindResult bind(BindRequest request) throws ErrorResultException, InterruptedException; |
| | | BindResult bind(BindRequest request) throws ErrorResultException; |
| | | |
| | | /** |
| | | * Authenticates to the Directory Server using simple authentication and the |
| | |
| | | * @throws ErrorResultException |
| | | * If the result code indicates that the request failed for some |
| | | * reason. |
| | | * @throws InterruptedException |
| | | * If the current thread was interrupted while waiting. |
| | | * @throws LocalizedIllegalArgumentException |
| | | * If {@code name} could not be decoded using the default |
| | | * schema. |
| | |
| | | * @throws NullPointerException |
| | | * If {@code name} or {@code password} was {@code null}. |
| | | */ |
| | | BindResult bind(String name, char[] password) throws ErrorResultException, InterruptedException; |
| | | BindResult bind(String name, char[] password) throws ErrorResultException; |
| | | |
| | | /** |
| | | * Asynchronously authenticates to the Directory Server using the provided |
| | |
| | | * @throws ErrorResultException |
| | | * If the result code indicates that the request failed for some |
| | | * reason. |
| | | * @throws InterruptedException |
| | | * If the current thread was interrupted while waiting. |
| | | * @throws UnsupportedOperationException |
| | | * If this connection does not support compare operations. |
| | | * @throws IllegalStateException |
| | |
| | | * @throws NullPointerException |
| | | * If {@code request} was {@code null}. |
| | | */ |
| | | CompareResult compare(CompareRequest request) throws ErrorResultException, InterruptedException; |
| | | CompareResult compare(CompareRequest request) throws ErrorResultException; |
| | | |
| | | /** |
| | | * Compares the named entry in the Directory Server against the provided |
| | |
| | | * @throws ErrorResultException |
| | | * If the result code indicates that the request failed for some |
| | | * reason. |
| | | * @throws InterruptedException |
| | | * If the current thread was interrupted while waiting. |
| | | * @throws LocalizedIllegalArgumentException |
| | | * If {@code name} or {@code AttributeDescription} could not be |
| | | * decoded using the default schema. |
| | |
| | | * {@code assertionValue} was {@code null}. |
| | | */ |
| | | CompareResult compare(String name, String attributeDescription, String assertionValue) |
| | | throws ErrorResultException, InterruptedException; |
| | | throws ErrorResultException; |
| | | |
| | | /** |
| | | * Asynchronously compares an entry in the Directory Server using the |
| | |
| | | * @throws ErrorResultException |
| | | * If the result code indicates that the request failed for some |
| | | * reason. |
| | | * @throws InterruptedException |
| | | * If the current thread was interrupted while waiting. |
| | | * @throws UnsupportedOperationException |
| | | * If this connection does not support delete operations. |
| | | * @throws IllegalStateException |
| | |
| | | * @throws NullPointerException |
| | | * If {@code request} was {@code null}. |
| | | */ |
| | | Result delete(DeleteRequest request) throws ErrorResultException, InterruptedException; |
| | | Result delete(DeleteRequest request) throws ErrorResultException; |
| | | |
| | | /** |
| | | * Deletes the named entry from the Directory Server. |
| | |
| | | * @throws ErrorResultException |
| | | * If the result code indicates that the request failed for some |
| | | * reason. |
| | | * @throws InterruptedException |
| | | * If the current thread was interrupted while waiting. |
| | | * @throws LocalizedIllegalArgumentException |
| | | * If {@code name} could not be decoded using the default |
| | | * schema. |
| | |
| | | * @throws NullPointerException |
| | | * If {@code name} was {@code null}. |
| | | */ |
| | | Result delete(String name) throws ErrorResultException, InterruptedException; |
| | | Result delete(String name) throws ErrorResultException; |
| | | |
| | | /** |
| | | * Asynchronously deletes an entry from the Directory Server using the |
| | |
| | | * @throws ErrorResultException |
| | | * If the result code indicates that the request failed for some |
| | | * reason. |
| | | * @throws InterruptedException |
| | | * If the current thread was interrupted while waiting. |
| | | * @throws UnsupportedOperationException |
| | | * If this connection does not support extended operations. |
| | | * @throws IllegalStateException |
| | |
| | | * If {@code request} was {@code null}. |
| | | */ |
| | | <R extends ExtendedResult> R extendedRequest(ExtendedRequest<R> request) |
| | | throws ErrorResultException, InterruptedException; |
| | | throws ErrorResultException; |
| | | |
| | | /** |
| | | * Requests that the Directory Server performs the provided extended |
| | |
| | | * @throws ErrorResultException |
| | | * If the result code indicates that the request failed for some |
| | | * reason. |
| | | * @throws InterruptedException |
| | | * If the current thread was interrupted while waiting. |
| | | * @throws UnsupportedOperationException |
| | | * If this connection does not support extended operations. |
| | | * @throws IllegalStateException |
| | |
| | | * If {@code request} was {@code null}. |
| | | */ |
| | | <R extends ExtendedResult> R extendedRequest(ExtendedRequest<R> request, |
| | | IntermediateResponseHandler handler) throws ErrorResultException, InterruptedException; |
| | | IntermediateResponseHandler handler) throws ErrorResultException; |
| | | |
| | | /** |
| | | * Requests that the Directory Server performs the provided extended |
| | |
| | | * @throws ErrorResultException |
| | | * If the result code indicates that the request failed for some |
| | | * reason. |
| | | * @throws InterruptedException |
| | | * If the current thread was interrupted while waiting. |
| | | * @throws UnsupportedOperationException |
| | | * If this connection does not support extended operations. |
| | | * @throws IllegalStateException |
| | |
| | | * If {@code requestName} was {@code null}. |
| | | */ |
| | | GenericExtendedResult extendedRequest(String requestName, ByteString requestValue) |
| | | throws ErrorResultException, InterruptedException; |
| | | throws ErrorResultException; |
| | | |
| | | /** |
| | | * Asynchronously performs the provided extended request in the Directory |
| | |
| | | * @throws ErrorResultException |
| | | * If the result code indicates that the request failed for some |
| | | * reason. |
| | | * @throws InterruptedException |
| | | * If the current thread was interrupted while waiting. |
| | | * @throws UnsupportedOperationException |
| | | * If this connection does not support modify operations. |
| | | * @throws IllegalStateException |
| | |
| | | * @throws NullPointerException |
| | | * If {@code request} was {@code null}. |
| | | */ |
| | | Result modify(ModifyRequest request) throws ErrorResultException, InterruptedException; |
| | | Result modify(ModifyRequest request) throws ErrorResultException; |
| | | |
| | | /** |
| | | * Modifies an entry in the Directory Server using the provided lines of |
| | |
| | | * @throws ErrorResultException |
| | | * If the result code indicates that the request failed for some |
| | | * reason. |
| | | * @throws InterruptedException |
| | | * If the current thread was interrupted while waiting. |
| | | * @throws UnsupportedOperationException |
| | | * If this connection does not support modify operations. |
| | | * @throws LocalizedIllegalArgumentException |
| | |
| | | * @throws NullPointerException |
| | | * If {@code ldifLines} was {@code null} . |
| | | */ |
| | | Result modify(String... ldifLines) throws ErrorResultException, InterruptedException; |
| | | Result modify(String... ldifLines) throws ErrorResultException; |
| | | |
| | | /** |
| | | * Asynchronously modifies an entry in the Directory Server using the |
| | |
| | | * @throws ErrorResultException |
| | | * If the result code indicates that the request failed for some |
| | | * reason. |
| | | * @throws InterruptedException |
| | | * If the current thread was interrupted while waiting. |
| | | * @throws UnsupportedOperationException |
| | | * If this connection does not support modify DN operations. |
| | | * @throws IllegalStateException |
| | |
| | | * @throws NullPointerException |
| | | * If {@code request} was {@code null}. |
| | | */ |
| | | Result modifyDN(ModifyDNRequest request) throws ErrorResultException, InterruptedException; |
| | | Result modifyDN(ModifyDNRequest request) throws ErrorResultException; |
| | | |
| | | /** |
| | | * Renames the named entry in the Directory Server using the provided new |
| | |
| | | * @throws ErrorResultException |
| | | * If the result code indicates that the request failed for some |
| | | * reason. |
| | | * @throws InterruptedException |
| | | * If the current thread was interrupted while waiting. |
| | | * @throws LocalizedIllegalArgumentException |
| | | * If {@code name} or {@code newRDN} could not be decoded using |
| | | * the default schema. |
| | |
| | | * @throws NullPointerException |
| | | * If {@code name} or {@code newRDN} was {@code null}. |
| | | */ |
| | | Result modifyDN(String name, String newRDN) throws ErrorResultException, InterruptedException; |
| | | Result modifyDN(String name, String newRDN) throws ErrorResultException; |
| | | |
| | | /** |
| | | * Asynchronously renames an entry in the Directory Server using the |
| | |
| | | * @throws ErrorResultException |
| | | * If the result code indicates that the request failed for some |
| | | * reason. |
| | | * @throws InterruptedException |
| | | * If the current thread was interrupted while waiting. |
| | | * @throws UnsupportedOperationException |
| | | * If this connection does not support search operations. |
| | | * @throws IllegalStateException |
| | |
| | | * If the {@code name} was {@code null}. |
| | | */ |
| | | SearchResultEntry readEntry(DN name, String... attributeDescriptions) |
| | | throws ErrorResultException, InterruptedException; |
| | | throws ErrorResultException; |
| | | |
| | | /** |
| | | * Reads the named entry from the Directory Server. |
| | |
| | | * @throws ErrorResultException |
| | | * If the result code indicates that the request failed for some |
| | | * reason. |
| | | * @throws InterruptedException |
| | | * If the current thread was interrupted while waiting. |
| | | * @throws LocalizedIllegalArgumentException |
| | | * If {@code baseObject} could not be decoded using the default |
| | | * schema. |
| | |
| | | * If the {@code name} was {@code null}. |
| | | */ |
| | | SearchResultEntry readEntry(String name, String... attributeDescriptions) |
| | | throws ErrorResultException, InterruptedException; |
| | | throws ErrorResultException; |
| | | |
| | | /** |
| | | * Asynchronously reads the named entry from the Directory Server. |
| | |
| | | * @throws ErrorResultException |
| | | * If the result code indicates that the request failed for some |
| | | * reason. |
| | | * @throws InterruptedException |
| | | * If the current thread was interrupted while waiting. |
| | | * @throws UnsupportedOperationException |
| | | * If this connection does not support search operations. |
| | | * @throws IllegalStateException |
| | |
| | | * If {@code request} or {@code entries} was {@code null}. |
| | | */ |
| | | Result search(SearchRequest request, Collection<? super SearchResultEntry> entries) |
| | | throws ErrorResultException, InterruptedException; |
| | | throws ErrorResultException; |
| | | |
| | | /** |
| | | * Searches the Directory Server using the provided search request. Any |
| | |
| | | * @throws ErrorResultException |
| | | * If the result code indicates that the request failed for some |
| | | * reason. |
| | | * @throws InterruptedException |
| | | * If the current thread was interrupted while waiting. |
| | | * @throws UnsupportedOperationException |
| | | * If this connection does not support search operations. |
| | | * @throws IllegalStateException |
| | |
| | | * If {@code request} or {@code entries} was {@code null}. |
| | | */ |
| | | Result search(SearchRequest request, Collection<? super SearchResultEntry> entries, |
| | | Collection<? super SearchResultReference> references) throws ErrorResultException, |
| | | InterruptedException; |
| | | Collection<? super SearchResultReference> references) throws ErrorResultException; |
| | | |
| | | /** |
| | | * Searches the Directory Server using the provided search request. Any |
| | |
| | | * @throws ErrorResultException |
| | | * If the result code indicates that the request failed for some |
| | | * reason. |
| | | * @throws InterruptedException |
| | | * If the current thread was interrupted while waiting. |
| | | * @throws UnsupportedOperationException |
| | | * If this connection does not support search operations. |
| | | * @throws IllegalStateException |
| | |
| | | * @throws NullPointerException |
| | | * If {@code request} was {@code null}. |
| | | */ |
| | | Result search(SearchRequest request, SearchResultHandler handler) throws ErrorResultException, |
| | | InterruptedException; |
| | | Result search(SearchRequest request, SearchResultHandler handler) throws ErrorResultException; |
| | | |
| | | /** |
| | | * Searches the Directory Server using the provided search parameters. Any |
| | |
| | | * @throws ErrorResultException |
| | | * If the result code indicates that the request failed for some |
| | | * reason. |
| | | * @throws InterruptedException |
| | | * If the current thread was interrupted while waiting. |
| | | * @throws UnsupportedOperationException |
| | | * If this connection does not support search operations. |
| | | * @throws IllegalStateException |
| | |
| | | * @throws NullPointerException |
| | | * If the {@code request} was {@code null}. |
| | | */ |
| | | SearchResultEntry searchSingleEntry(SearchRequest request) throws ErrorResultException, |
| | | InterruptedException; |
| | | SearchResultEntry searchSingleEntry(SearchRequest request) throws ErrorResultException; |
| | | |
| | | /** |
| | | * Searches the Directory Server for a single entry using the provided |
| | |
| | | * @throws ErrorResultException |
| | | * If the result code indicates that the request failed for some |
| | | * reason. |
| | | * @throws InterruptedException |
| | | * If the current thread was interrupted while waiting. |
| | | * @throws LocalizedIllegalArgumentException |
| | | * If {@code baseObject} could not be decoded using the default |
| | | * schema or if {@code filter} is not a valid LDAP string |
| | |
| | | * were {@code null}. |
| | | */ |
| | | SearchResultEntry searchSingleEntry(String baseObject, SearchScope scope, String filter, |
| | | String... attributeDescriptions) throws ErrorResultException, InterruptedException; |
| | | String... attributeDescriptions) throws ErrorResultException; |
| | | |
| | | /** |
| | | * Asynchronously searches the Directory Server for a single entry using the |