@Override public Boolean call() throws Exception { return connection.connect(); } }, Callable.class,
@Override public Boolean call() throws Exception { return connection.connect(); } }, Callable.class,
/** * {@inheritDoc} */ public LdapConnection makeObject() throws LdapException { LdapNetworkConnection connection = config.isUseTls() ? new TlsGuardingConnection(config) : new LdapNetworkConnection(config); connection.connect(); log.debug("creating new connection: {}", connection); return connection; }
boolean connected = ldapConnection.connect(); if ( !connected )
/** * {@inheritDoc} */ @Override public ExtendedFuture extendedAsync( ExtendedRequest extendedRequest ) throws LdapException { if ( extendedRequest == null ) { String msg = I18n.err( I18n.ERR_04154_CANNOT_PROCESS_NULL_EXT_REQ ); if ( LOG.isDebugEnabled() ) { LOG.debug( msg ); } throw new IllegalArgumentException( msg ); } // try to connect, if we aren't already connected. connect(); checkSession(); int newId = messageId.incrementAndGet(); extendedRequest.setMessageId( newId ); ExtendedFuture extendedFuture = new ExtendedFuture( this, newId ); addToFutureMap( newId, extendedFuture ); // Send the request to the server writeRequest( extendedRequest ); // Ok, done return the future return extendedFuture; }
/** * {@inheritDoc} */ @Override public ExtendedFuture extendedAsync( ExtendedRequest extendedRequest ) throws LdapException { if ( extendedRequest == null ) { String msg = I18n.err( I18n.ERR_04154_CANNOT_PROCESS_NULL_EXT_REQ ); if ( LOG.isDebugEnabled() ) { LOG.debug( msg ); } throw new IllegalArgumentException( msg ); } // try to connect, if we aren't already connected. connect(); checkSession(); int newId = messageId.incrementAndGet(); extendedRequest.setMessageId( newId ); ExtendedFuture extendedFuture = new ExtendedFuture( this, newId ); addToFutureMap( newId, extendedFuture ); // Send the request to the server writeRequest( extendedRequest ); // Ok, done return the future return extendedFuture; }
/** * {@inheritDoc} */ @Override public ExtendedFuture extendedAsync( ExtendedRequest extendedRequest ) throws LdapException { if ( extendedRequest == null ) { String msg = I18n.err( I18n.ERR_04154_CANNOT_PROCESS_NULL_EXT_REQ ); if ( LOG.isDebugEnabled() ) { LOG.debug( msg ); } throw new IllegalArgumentException( msg ); } // try to connect, if we aren't already connected. connect(); checkSession(); int newId = messageId.incrementAndGet(); extendedRequest.setMessageId( newId ); ExtendedFuture extendedFuture = new ExtendedFuture( this, newId ); addToFutureMap( newId, extendedFuture ); // Send the request to the server writeRequest( extendedRequest ); // Ok, done return the future return extendedFuture; }
final LdapNetworkConnection lc = new LdapNetworkConnection(ldapConnectionConfig); conn = new ApacheLdapConnection(lc, getProviderConfig()); lc.connect(); if (useStartTLS) { lc.startTls();