Le 01/09/2017 à 17:47, Sathyanarayan, Harish a écrit :
> I am intercepting the search request via custom interceptor and searching a
> third-party ldap but want to return back the result to the client. However I
> cannot return the EntryFilteringCursorImpl. Any techniques to achieve this by
> passing the result to the client. I have an EntryCursor with mutltiple
> entries. Next(searchContext) is not going to work obviously.
>
> Am overriding this
> @Override
> public EntryFilteringCursor search(SearchOperationContext searchContext)
> throws LdapException
Results are managed by the cursor the interceptor is retruning. If you
interceptor get the results from a remote LDAP server, bypassing teh
rest of the chain, than you need to wrap a cursor around the entries you
get, and return this cursor ::
public EntryFilteringCursor search( SearchOperationContext
searchContext ) throws LdapException
{
EntryFilteringCursor cursor = <grab the data from the remote
LDAP server>
return cursor;
}
--
Emmanuel Lecharny
Symas.com
directory.apache.org