Package com.unboundid.ldap.sdk
Class BasicAsyncResultListener
java.lang.Object
com.unboundid.ldap.sdk.BasicAsyncResultListener
- All Implemented Interfaces:
AsyncResultListener,Serializable
@Mutable
@ThreadSafety(level=NOT_THREADSAFE)
public final class BasicAsyncResultListener
extends Object
implements AsyncResultListener, Serializable
This class provides a basic implementation of the
AsyncResultListener
interface that will merely set the result object to a local variable that can
be accessed through a getter method. It provides a listener that may be
easily used when processing an asynchronous operation using the
AsyncRequestID as a java.util.concurrent.Future object.- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a new instance of this class for use in processing a single add, delete, modify, or modify DN operation. -
Method Summary
Modifier and TypeMethodDescriptionRetrieves the result that has been received for the associated asynchronous operation, if it has been received.voidldapResultReceived(AsyncRequestID requestID, LDAPResult ldapResult) Indicates that the provided LDAP result has been received in response to an asynchronous operation.
-
Constructor Details
-
BasicAsyncResultListener
public BasicAsyncResultListener()Creates a new instance of this class for use in processing a single add, delete, modify, or modify DN operation. A single basic async result listener object may not be used for multiple operations.
-
-
Method Details
-
ldapResultReceived
@InternalUseOnly public void ldapResultReceived(@NotNull AsyncRequestID requestID, @NotNull LDAPResult ldapResult) Indicates that the provided LDAP result has been received in response to an asynchronous operation. Note that automatic referral following is not supported for asynchronous operations, so it is possible that this result could include a referral.- Specified by:
ldapResultReceivedin interfaceAsyncResultListener- Parameters:
requestID- The async request ID of the request for which the response was received.ldapResult- The LDAP result that has been received.
-
getLDAPResult
Retrieves the result that has been received for the associated asynchronous operation, if it has been received.- Returns:
- The result that has been received for the associated asynchronous
operation, or
nullif no response has been received yet.
-