The UnboundID LDAP SDK for Java provides an LDAPListener framework that allows you to create your own code that accepts LDAP requests from clients and can provide responses back to them. When the LDAPListener receives a request, it uses an LDAPListenerRequestHandler to process the request and generate the result.
The in-memory directory server uses the InMemoryRequestHandler to perform this processing, but you can create your own request handler implementation that does whatever you want (e.g., the CannedResponseRequestHandler bindly returns a fixed response to any request), and you can have a request handler that does some processing before delegating to another request handler (e.g., the AccessLogRequestHandler and LDAPDebuggerRequestHandler implementations intercept requests and write information about them to a log file before forwarding them on to another request handler, and then intercepts and logs information about the response before returning it back to the client; conversely, the ProxyRequestHandler does the processing to another directory server over LDAP).
If you want to provide custom processing, then you should create your own LDAPListenerRequestHandler subclass (and as you assumed, the processBindRequest method can be used to perform the processing for a bind operation). If that request handler does all the processing for the operation, then you can create and return the response yourself. If you just need to intercept the request and capture information about it before forwarding it on to something else that will really perform the processing, then you should delegate to another request handler. There are examples of both of those already in the LDAP SDK, so you can use them as a model to create what you need.