001    /*
002     * Copyright 2009-2016 UnboundID Corp.
003     * All Rights Reserved.
004     */
005    /*
006     * Copyright (C) 2009-2016 UnboundID Corp.
007     *
008     * This program is free software; you can redistribute it and/or modify
009     * it under the terms of the GNU General Public License (GPLv2 only)
010     * or the terms of the GNU Lesser General Public License (LGPLv2.1 only)
011     * as published by the Free Software Foundation.
012     *
013     * This program is distributed in the hope that it will be useful,
014     * but WITHOUT ANY WARRANTY; without even the implied warranty of
015     * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
016     * GNU General Public License for more details.
017     *
018     * You should have received a copy of the GNU General Public License
019     * along with this program; if not, see <http://www.gnu.org/licenses>.
020     */
021    package com.unboundid.ldap.sdk.migrate.ldapjdk;
022    
023    
024    
025    import com.unboundid.util.Extensible;
026    import com.unboundid.util.ThreadSafety;
027    import com.unboundid.util.ThreadSafetyLevel;
028    
029    
030    
031    /**
032     * This interface defines a method that can be used to bind to a server when
033     * following a referral.
034     * <BR><BR>
035     * This class is primarily intended to be used in the process of updating
036     * applications which use the Netscape Directory SDK for Java to switch to or
037     * coexist with the UnboundID LDAP SDK for Java.  For applications not written
038     * using the Netscape Directory SDK for Java, the
039     * {@link com.unboundid.ldap.sdk.ReferralConnector} class should be used
040     * instead.
041     */
042    @Extensible()
043    @ThreadSafety(level=ThreadSafetyLevel.INTERFACE_THREADSAFE)
044    public interface LDAPBind
045    {
046      /**
047       * Authenticates the provided connection created for the purpose of following
048       * a referral.
049       *
050       * @param  conn  The connection to be authenticated.
051       *
052       * @throws  LDAPException  If a problem occurs while processing the bind.
053       */
054      void bind(final LDAPConnection conn)
055           throws LDAPException;
056    }