Class ControlExchangeDirContextProcessor<S extends Control,T extends Control>

java.lang.Object
org.springframework.ldap.control.ControlExchangeDirContextProcessor<S,T>
Type Parameters:
S - the type of the request Control
T - the type of the response Control
All Implemented Interfaces:
DirContextProcessor
Direct Known Subclasses:
PagedResultsControlExchangeDirContextProcessor

public class ControlExchangeDirContextProcessor<S extends Control,T extends Control> extends Object implements DirContextProcessor
A generic DirContextProcessor implementation for managing LDAP request and response controls through a ControlExchange.

This processor handles the lifecycle of LDAP controls by:

  • Adding the request control from the exchange to the LdapContext before operations
  • Extracting matching response controls after operations
  • Updating the exchange with the response control for subsequent operations

For stateful controls that require maintaining connection state across multiple operations (such as paged results or server-side sorting), the same LDAP connection must be reused. Spring LDAP's SingleContextSource and TransactionAwareContextSourceProxy provide this capability when wired into LdapTemplate and LdapClient instances.

Since:
4.1
See Also: