Down to the Wire: Using the Asynchronous Interface

Underneath the synchronous operation interfaces we've used so far in this book is anasynchronous layer that is closer to the LDAP wire protocol. When you call LDAPConnection.modify, the request is immediately sent off to the server and the client then waits at a new dedicated message queue for a response. An internal listener thread receives messages from the server asynchronously. It examines the sequential operation number in each message and delivers the message to the corresponding queue. The waiting client then wakes up, reads the message, and returns from the modify call.

The synchronous interface is generally the preferred interface for operations that return a single result—that is, all ...

Get LDAP Programming with Java™ now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.