Package com.unboundid.ldap.sdk
Class BasicAsyncCompareResultListener
java.lang.Object
com.unboundid.ldap.sdk.BasicAsyncCompareResultListener
- All Implemented Interfaces:
AsyncCompareResultListener,Serializable
@Mutable
@ThreadSafety(level=NOT_THREADSAFE)
public final class BasicAsyncCompareResultListener
extends Object
implements AsyncCompareResultListener, Serializable
This class provides a basic implementation of the
AsyncCompareResultListener 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 compare 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 compare operation. -
Method Summary
Modifier and TypeMethodDescriptionvoidcompareResultReceived(AsyncRequestID requestID, CompareResult compareResult) Indicates that the provided LDAP result has been received in response to an asynchronous compare operation.Retrieves the result that has been received for the associated asynchronous compare operation, if it has been received.
-
Constructor Details
-
BasicAsyncCompareResultListener
public BasicAsyncCompareResultListener()Creates a new instance of this class for use in processing a single compare operation. A single basic async compare result listener object may not be used for multiple operations.
-
-
Method Details
-
compareResultReceived
@InternalUseOnly public void compareResultReceived(@NotNull AsyncRequestID requestID, @NotNull CompareResult compareResult) Indicates that the provided LDAP result has been received in response to an asynchronous compare 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:
compareResultReceivedin interfaceAsyncCompareResultListener- Parameters:
requestID- The async request ID of the request for which the response was received.compareResult- The compare result that has been received.
-
getCompareResult
Retrieves the result that has been received for the associated asynchronous compare operation, if it has been received.- Returns:
- The result that has been received for the associated asynchronous
compare operation, or
nullif no response has been received yet.
-