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 retrieve information to
033 * use to bind to a server when following referrals.
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 LDAPRebind
045 {
046 /**
047 * Retrieves information that should be used when authenticating to the
048 * specified server for the purpose of following a referral.
049 *
050 * @param host The address of the server to which the connection will be
051 * established.
052 * @param port The port of the server to which the connection will be
053 * established.
054 *
055 * @return Information that should be used when authenticating to the
056 * specified server.
057 */
058 LDAPRebindAuth getRebindAuthentication(final String host, final int port);
059 }