@Override public Response<S> call() throws LdapException { return operation.execute(request); } };
/** * Returns a {@link Callable} that executes the supplied request with the supplied operation. * * @param <Q> type of ldap request * @param <S> type of ldap response * @param operation to execute * @param request to pass to the operation * * @return callable for the supplied operation and request */ public static <Q extends Request, S> Callable<Response<S>> createCallable( final Operation<Q, S> operation, final Q request) { return () -> operation.execute(request); }
/** * Returns a {@link Callable} that executes the supplied request with the supplied operation. * * @param <Q> type of ldap request * @param <S> type of ldap response * @param operation to execute * @param request to pass to the operation * * @return callable for the supplied operation and request */ public static <Q extends Request, S> Callable<Response<S>> createCallable( final Operation<Q, S> operation, final Q request) { return () -> operation.execute(request); }
@Override public Response<S> call() throws LdapException { try { conn.open(); return operation.execute(request); } finally { conn.close(); } } };
@Override public Response<S> call() throws LdapException { try { conn.open(); return operation.execute(request); } finally { conn.close(); } } };
/** * Returns a {@link Callable} that executes the supplied request with the supplied operation in a try-finally block * that opens and closes the connection. * * @param <Q> type of ldap request * @param <S> type of ldap response * @param conn connection that the operation will execute on * @param operation to execute * @param request to pass to the operation * * @return callable for the supplied operation and request */ protected static <Q extends Request, S> Callable<Response<S>> createCallable( final Connection conn, final Operation<Q, S> operation, final Q request) { return () -> { try { conn.open(); return operation.execute(request); } finally { conn.close(); } }; } }
/** * Returns a {@link Callable} that executes the supplied request with the supplied operation in a try-finally block * that opens and closes the connection. * * @param <Q> type of ldap request * @param <S> type of ldap response * @param conn connection that the operation will execute on * @param operation to execute * @param request to pass to the operation * * @return callable for the supplied operation and request */ protected static <Q extends Request, S> Callable<Response<S>> createCallable( final Connection conn, final Operation<Q, S> operation, final Q request) { return () -> { try { conn.open(); return operation.execute(request); } finally { conn.close(); } }; } }
/** * Returns a {@link Callable} that executes the supplied request with the supplied operation in a try-finally block * that opens and closes the connection. * * @param <Q> type of ldap request * @param <S> type of ldap response * @param conn connection that the operation will execute on * @param operation to execute * @param request to pass to the operation * * @return callable for the supplied operation and request */ protected static <Q extends Request, S> Callable<Response<S>> createCallable( final Connection conn, final Operation<Q, S> operation, final Q request) { return () -> { try { conn.open(); return operation.execute(request); } finally { conn.close(); } }; } }
/** * Returns a {@link Callable} that executes the supplied request with the supplied operation in a try-finally block * that opens and closes the connection. * * @param <Q> type of ldap request * @param <S> type of ldap response * @param conn connection that the operation will execute on * @param operation to execute * @param request to pass to the operation * * @return callable for the supplied operation and request */ protected static <Q extends Request, S> Callable<Response<S>> createCallable( final Connection conn, final Operation<Q, S> operation, final Q request) { return () -> { try { conn.open(); return operation.execute(request); } finally { conn.close(); } }; } }
this.searchRequest.getBaseDn()); final Response<SearchResult> searchResult = searchOperation.execute(this.searchRequest); if (searchResult.getResultCode() == ResultCode.SUCCESS) { return processSpnegoAttribute(searchResult);
referralResponse = op.execute(referralRequest); } catch (LdapException e) { logger.warn("Could not follow referral to " + url, e);
referralResponse = op.execute(referralRequest); } catch (LdapException e) { logger.warn("Could not follow referral to " + url, e);
referralResponse = op.execute(referralRequest); } catch (LdapException e) { logger.warn("Could not follow referral to " + url, e);