| | |
| | | import javax.servlet.ServletRequest; |
| | | |
| | | import org.forgerock.opendj.ldap.ErrorResultException; |
| | | import org.forgerock.opendj.ldap.ResultHandler; |
| | | import org.forgerock.opendj.ldap.SearchResultHandler; |
| | | import org.forgerock.opendj.ldap.responses.Result; |
| | | import org.opends.messages.Message; |
| | |
| | | { |
| | | |
| | | final Operation operation; |
| | | final AsynchronousFutureResult<Result, SearchResultHandler> futureResult; |
| | | final AsynchronousFutureResult<Result, ResultHandler<? super Result>> |
| | | futureResult; |
| | | |
| | | public OperationWithFutureResult(Operation operation, |
| | | AsynchronousFutureResult<Result, SearchResultHandler> futureResult) |
| | | AsynchronousFutureResult<Result, ResultHandler<? super Result>> |
| | | futureResult) |
| | | { |
| | | this.operation = operation; |
| | | this.futureResult = futureResult; |
| | | } |
| | | |
| | | @Override |
| | | public String toString() |
| | | { |
| | | return operation.toString(); |
| | | } |
| | | } |
| | | |
| | | /** The tracer object for the debug logger. */ |
| | |
| | | this.operationsInProgress.get(operation.getMessageID()); |
| | | if (op != null) |
| | | { |
| | | op.futureResult.getResultHandler().handleEntry(from(searchEntry)); |
| | | ((SearchResultHandler) op.futureResult.getResultHandler()) |
| | | .handleEntry(from(searchEntry)); |
| | | } |
| | | } |
| | | |
| | |
| | | this.operationsInProgress.get(operation.getMessageID()); |
| | | if (op != null) |
| | | { |
| | | op.futureResult.getResultHandler().handleReference(from(searchReference)); |
| | | ((SearchResultHandler) op.futureResult.getResultHandler()) |
| | | .handleReference(from(searchReference)); |
| | | } |
| | | return connectionValid; |
| | | } |
| | |
| | | * If an error occurs |
| | | */ |
| | | void addOperationInProgress(Operation operation, |
| | | AsynchronousFutureResult<Result, SearchResultHandler> futureResult) |
| | | throws DirectoryException |
| | | AsynchronousFutureResult<Result, ResultHandler<? super Result>> |
| | | futureResult) throws DirectoryException |
| | | { |
| | | synchronized (opsInProgressLock) |
| | | { |