| | |
| | | * ErrorResultException} will be thrown. |
| | | */ |
| | | final class AuthenticatedConnectionFactory extends |
| | | AbstractConnectionFactory<AsynchronousConnection> |
| | | AbstractConnectionFactory |
| | | { |
| | | |
| | | private final BindRequest request; |
| | | |
| | | private final ConnectionFactory<?> parentFactory; |
| | | private final ConnectionFactory parentFactory; |
| | | |
| | | |
| | | |
| | |
| | | * @param request |
| | | * The Bind request to use for authentication. |
| | | */ |
| | | AuthenticatedConnectionFactory(ConnectionFactory<?> factory, |
| | | AuthenticatedConnectionFactory(ConnectionFactory factory, |
| | | BindRequest request) throws NullPointerException |
| | | { |
| | | this.parentFactory = factory; |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | public FutureResult<AsynchronousConnection> getAsynchronousConnection( |
| | | ResultHandler<? super AsynchronousConnection> handler) |
| | | ResultHandler<AsynchronousConnection> handler) |
| | | { |
| | | FutureResultImpl future = new FutureResultImpl(request, handler); |
| | | future.futureConnectionResult.setFutureResult(parentFactory |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | public boolean isValid() { |
| | | public boolean isValid() |
| | | { |
| | | return connection.isValid(); |
| | | } |
| | | |