Class AbstractSynchronousConnection

java.lang.Object
org.forgerock.opendj.ldap.AbstractConnection
org.forgerock.opendj.ldap.AbstractSynchronousConnection
All Implemented Interfaces:
Closeable, AutoCloseable, Connection

public abstract class AbstractSynchronousConnection extends AbstractConnection
An abstract connection whose asynchronous methods are implemented in terms of synchronous methods.

NOTE: this implementation does not support intermediate response handlers except for extended operations, because they are not supported by the equivalent synchronous methods.

  • Constructor Details

    • AbstractSynchronousConnection

      protected AbstractSynchronousConnection()
      Creates a new abstract synchronous connection.
  • Method Details

    • abandonAsync

      public LdapPromise<Void> abandonAsync(AbandonRequest request)
      Abandon operations are not supported because operations are performed synchronously and the ID of the request to be abandoned cannot be determined. Thread interruption must be used in order to cancel a blocked request.
      Parameters:
      request - The request identifying the operation to be abandoned.
      Returns:
      A promise whose result is Void.
      Throws:
      UnsupportedOperationException - Always thrown: abandon requests are not supported for synchronous connections.
    • addAsync

      public LdapPromise<Result> addAsync(AddRequest request, IntermediateResponseHandler intermediateResponseHandler)
      Description copied from interface: Connection
      Asynchronously adds an entry to the Directory Server using the provided add request.
      Parameters:
      request - The add request.
      intermediateResponseHandler - An intermediate response handler which can be used to process any intermediate responses as they are received, may be null.
      Returns:
      A promise representing the result of the operation.
    • bindAsync

      public LdapPromise<BindResult> bindAsync(BindRequest request, IntermediateResponseHandler intermediateResponseHandler)
      Description copied from interface: Connection
      Asynchronously authenticates to the Directory Server using the provided bind request.
      Parameters:
      request - The bind request.
      intermediateResponseHandler - An intermediate response handler which can be used to process any intermediate responses as they are received, may be null.
      Returns:
      A promise representing the result of the operation.
    • compareAsync

      public LdapPromise<CompareResult> compareAsync(CompareRequest request, IntermediateResponseHandler intermediateResponseHandler)
      Description copied from interface: Connection
      Asynchronously compares an entry in the Directory Server using the provided compare request.
      Parameters:
      request - The compare request.
      intermediateResponseHandler - An intermediate response handler which can be used to process any intermediate responses as they are received, may be null.
      Returns:
      A promise representing the result of the operation.
    • deleteAsync

      public LdapPromise<Result> deleteAsync(DeleteRequest request, IntermediateResponseHandler intermediateResponseHandler)
      Description copied from interface: Connection
      Asynchronously deletes an entry from the Directory Server using the provided delete request.
      Parameters:
      request - The delete request.
      intermediateResponseHandler - An intermediate response handler which can be used to process any intermediate responses as they are received, may be null.
      Returns:
      A promise representing the result of the operation.
    • extendedRequestAsync

      public <R extends ExtendedResult> LdapPromise<R> extendedRequestAsync(ExtendedRequest<R> request, IntermediateResponseHandler intermediateResponseHandler)
      Description copied from interface: Connection
      Asynchronously performs the provided extended request in the Directory Server.
      Type Parameters:
      R - The type of result returned by the extended request.
      Parameters:
      request - The extended request.
      intermediateResponseHandler - An intermediate response handler which can be used to process any intermediate responses as they are received, may be null.
      Returns:
      A promise representing the result of the operation.
    • modifyAsync

      public LdapPromise<Result> modifyAsync(ModifyRequest request, IntermediateResponseHandler intermediateResponseHandler)
      Description copied from interface: Connection
      Asynchronously modifies an entry in the Directory Server using the provided modify request.
      Parameters:
      request - The modify request.
      intermediateResponseHandler - An intermediate response handler which can be used to process any intermediate responses as they are received, may be null.
      Returns:
      A promise representing the result of the operation.
    • modifyDnAsync

      public LdapPromise<Result> modifyDnAsync(ModifyDnRequest request, IntermediateResponseHandler intermediateResponseHandler)
      Description copied from interface: Connection
      Asynchronously renames an entry in the Directory Server using the provided modify DN request.
      Parameters:
      request - The modify DN request.
      intermediateResponseHandler - An intermediate response handler which can be used to process any intermediate responses as they are received, may be null.
      Returns:
      A promise representing the result of the operation.
    • searchAsync

      public LdapPromise<Result> searchAsync(SearchRequest request, IntermediateResponseHandler intermediateResponseHandler, SearchResultHandler entryHandler)
      Description copied from interface: Connection
      Asynchronously searches the Directory Server using the provided search request.
      Parameters:
      request - The search request.
      intermediateResponseHandler - An intermediate response handler which can be used to process any intermediate responses as they are received, may be null.
      entryHandler - A search result handler which can be used to asynchronously process the search result entries and references as they are received, may be null.
      Returns:
      A promise representing the result of the operation.