| | |
| | | * |
| | | * |
| | | * Copyright 2009-2010 Sun Microsystems, Inc. |
| | | * Portions copyright 2011-2012 ForgeRock AS. |
| | | * Portions copyright 2011-2013 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.forgerock.opendj.ldap; |
| | |
| | | * Server. |
| | | */ |
| | | public final class LDAPConnectionFactory implements ConnectionFactory { |
| | | // We implement the factory using the pimpl idiom in order to avoid making |
| | | // too many implementation classes public. |
| | | |
| | | /* |
| | | * We implement the factory using the pimpl idiom in order to avoid making |
| | | * too many implementation classes public. |
| | | */ |
| | | private final LDAPConnectionFactoryImpl impl; |
| | | |
| | | /** |
| | |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override |
| | | public void close() { |
| | | impl.close(); |
| | | } |
| | | |
| | | @Override |
| | | public FutureResult<Connection> getConnectionAsync( |
| | | final ResultHandler<? super Connection> handler) { |
| | | return impl.getConnectionAsync(handler); |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override |
| | | public Connection getConnection() throws ErrorResultException { |
| | | return impl.getConnection(); |
| | |
| | | return impl.getSocketAddress(); |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override |
| | | public String toString() { |
| | | return impl.toString(); |