@Override public synchronized Response<Void> reopen(final BindRequest request) throws LdapException { try { if (providerConnection != null) { providerConnection.close(null); } } catch (LdapException e) { logger.warn("Error closing connection with the LDAP", e); } finally { providerConnection = null; } providerConnection = providerConnectionFactory.create(); return providerConnection.bind(request); }
@Override public synchronized Response<Void> reopen(final BindRequest request) throws LdapException { try { if (providerConnection != null) { providerConnection.close(null); } } catch (LdapException e) { logger.warn("Error closing connection with the LDAP", e); } finally { providerConnection = null; } providerConnection = providerConnectionFactory.create(); return providerConnection.bind(request); }
@Override public synchronized Response<Void> reopen(final BindRequest request) throws LdapException { try { if (providerConnection != null) { providerConnection.close(null); } } catch (LdapException e) { logger.warn("Error closing connection with the LDAP", e); } finally { providerConnection = null; } providerConnection = providerConnectionFactory.create(); return providerConnection.bind(request); }
/** * This will establish a connection if one does not already exist and bind to the LDAP using the supplied bind * request. This connection should be closed using {@link #close()}. * * @param request bind request * * @return response associated with the bind operation * * @throws IllegalStateException if the connection is already open * @throws LdapException if the LDAP cannot be reached */ @Override public synchronized Response<Void> open(final BindRequest request) throws LdapException { if (isOpen()) { throw new IllegalStateException("Connection already open"); } providerConnection = providerConnectionFactory.create(); return providerConnection.bind(request); }
/** * This will establish a connection if one does not already exist and bind to the LDAP using the supplied bind * request. This connection should be closed using {@link #close()}. * * @param request bind request * * @return response associated with the bind operation * * @throws IllegalStateException if the connection is already open * @throws LdapException if the LDAP cannot be reached */ @Override public synchronized Response<Void> open(final BindRequest request) throws LdapException { if (isOpen()) { throw new IllegalStateException("Connection already open"); } providerConnection = providerConnectionFactory.create(); return providerConnection.bind(request); }
/** * This will establish a connection if one does not already exist and bind to the LDAP using the supplied bind * request. This connection should be closed using {@link #close()}. * * @param request bind request * * @return response associated with the bind operation * * @throws IllegalStateException if the connection is already open * @throws LdapException if the LDAP cannot be reached */ @Override public synchronized Response<Void> open(final BindRequest request) throws LdapException { if (isOpen()) { throw new IllegalStateException("Connection already open"); } providerConnection = providerConnectionFactory.create(); return providerConnection.bind(request); }
@Override public synchronized Response<Void> reopen() throws LdapException { try { if (providerConnection != null) { providerConnection.close(null); } } catch (LdapException e) { logger.warn("Error closing connection with the LDAP", e); } finally { providerConnection = null; } providerConnection = providerConnectionFactory.create(); if (config.getConnectionInitializer() != null) { return config.getConnectionInitializer().initialize(this); } else { return new Response<>(null, null); } }
@Override public synchronized Response<Void> reopen() throws LdapException { try { if (providerConnection != null) { providerConnection.close(null); } } catch (LdapException e) { logger.warn("Error closing connection with the LDAP", e); } finally { providerConnection = null; } providerConnection = providerConnectionFactory.create(); if (config.getConnectionInitializer() != null) { return config.getConnectionInitializer().initialize(this); } else { return new Response<>(null, null); } }
@Override public synchronized Response<Void> reopen() throws LdapException { try { if (providerConnection != null) { providerConnection.close(null); } } catch (LdapException e) { logger.warn("Error closing connection with the LDAP", e); } finally { providerConnection = null; } providerConnection = providerConnectionFactory.create(); if (config.getConnectionInitializer() != null) { return config.getConnectionInitializer().initialize(this); } else { return new Response<>(null, null); } }
/** * This will establish a connection if one does not already exist. This connection should be closed using {@link * #close()}. * * @return response associated with the {@link ConnectionInitializer} or an empty response if no connection * initializer was configured * * @throws IllegalStateException if the connection is already open * @throws LdapException if the LDAP cannot be reached */ @Override public synchronized Response<Void> open() throws LdapException { if (isOpen()) { throw new IllegalStateException("Connection already open"); } providerConnection = providerConnectionFactory.create(); if (config.getConnectionInitializer() != null) { return config.getConnectionInitializer().initialize(this); } else { return new Response<>(null, null); } }
/** * This will establish a connection if one does not already exist. This connection should be closed using {@link * #close()}. * * @return response associated with the {@link ConnectionInitializer} or an empty response if no connection * initializer was configured * * @throws IllegalStateException if the connection is already open * @throws LdapException if the LDAP cannot be reached */ @Override public synchronized Response<Void> open() throws LdapException { if (isOpen()) { throw new IllegalStateException("Connection already open"); } providerConnection = providerConnectionFactory.create(); if (config.getConnectionInitializer() != null) { return config.getConnectionInitializer().initialize(this); } else { return new Response<>(null, null); } }
/** * This will establish a connection if one does not already exist. This connection should be closed using {@link * #close()}. * * @return response associated with the {@link ConnectionInitializer} or an empty response if no connection * initializer was configured * * @throws IllegalStateException if the connection is already open * @throws LdapException if the LDAP cannot be reached */ @Override public synchronized Response<Void> open() throws LdapException { if (isOpen()) { throw new IllegalStateException("Connection already open"); } providerConnection = providerConnectionFactory.create(); if (config.getConnectionInitializer() != null) { return config.getConnectionInitializer().initialize(this); } else { return new Response<>(null, null); } }