An LDAP server can include a referral result code for all operations. (Except Unbind and Abandon.) Ldaptive provides an interface called ReferralHandler to allow users to manage referrals however they like. If no referral handler is provided and a referral result code is received, the referral URL(s) can be inspected at Response.getReferralURLs().
The referral handler interface looks like:
The most common use case for referrals is for searching. If you wish to follow referrals, Ldaptive provides an implementation called SearchReferralHandler for this purpose. This implementation will also follow search references.
Handlers are also provided for Add, Compare, Delete, ModifyDn and Modify operations.
Ldaptive is an open source project developed and supported by
at Virginia Tech