Skip Navigation Links | |
Exit Print View | |
Oracle Directory Server Enterprise Edition Developer's Guide 11 g Release 1 (11.1.1.5.0) |
Part I Directory Server Plug-In API Guide
1. Before You Start Writing Plug-Ins
2. Changes to the Plug-In API Since Directory Server 5.2
3. Getting Started With Directory Server Plug-Ins
4. Working With Entries Using Plug-Ins
5. Extending Client Request Handling Using Plug-Ins
6. Handling Authentication Using Plug-Ins
7. Performing Internal Operations With Plug-Ins
8. Writing Entry Store and Entry Fetch Plug-Ins
9. Writing Extended Operation Plug-Ins
10. Writing Matching Rule Plug-Ins
How Matching Rule Plug-Ins Work
What a Matching Rule Plug-In Does
Configuring Matching Rule Plug-Ins
Registering Matching Rule Plug-Ins
Handling Extensible Match Filters
How Directory Server Handles Extensible Match Searches
Thread Safety and Filter Matching Functions
Input Parameters for Filter Index Functions
Output Parameters for Filter Index Functions
Thread Safety and Filter Index Functions
Input Parameters for Filter Factory Functions
Output Parameters for Filter Factory Functions
Thread Safety and Filter Factory Functions
Filter Object Destructor Function
Indexing Entries According to a Matching Rule
How Directory Server Handles the Index
Input Parameters for Indexer Factory Functions
Output Parameters for Indexer Factory Functions
Thread Safety and Indexer Factory Functions
Indexer Object Destructor Function
Enabling Sorting According to a Matching Rule
How Directory Server Performs Sorting According to a Matching Rule
11. Writing Password Storage Scheme Plug-Ins
12. Writing Password Quality Check Plug-Ins
13. Writing Computed Attribute Plug-Ins
Part II Directory Server Plug-In API Reference
14. Data Type and Structure Reference
15. Function Reference, Part I
16. Function Reference, Part II
This section explains how Directory Server finds a plug-in for a matching rule OID not recognized by that Directory Server.
Directory Server identifies matching rules by OID. The server keeps an internal list of which matching rule plug-ins handle which OIDs.
Directory Server uses the internal list to determine which plug-in to call when the server receives an extensible match filter search request that includes a matching rule OID. Directory Server initially builds the list as matching rule plug-ins register OIDs that the plug-ins handle using slapi_matchingrule_register() in the plug-in initialization function.
When the server encounters a matching rule OID that is not in the list, Directory Server queries each matching rule plug-in through registered factory functions. For every matching rule plug-in, Directory Server passes a parameter block that contains the OID to the matching rule factory function. The server then checks whether the factory function has in return provided a pointer in the parameter block. This pointer identifies the appropriate indexing or matching function for the OID.
If the factory function sets a pointer to the appropriate function, Directory Server assumes that the plug-in supports the matching rule.
The following shows how Directory Server checks whether a plug-in handles a specific filter match operation. The process for indexing closely resembles the process for matching.
Figure 10-7 Finding a Matching Rule Plug-In for an Unknown OID
The following summarizes the process shown in Figure 10-7.
Directory Server finds no match in the internal list of plug-ins to handle the OID. The server therefore creates a parameter block, and sets appropriate parameters for the factory, including SLAPI_PLUGIN_MR_OID.
Directory Server calls the factory function. The factory function either sets a pointer in the parameter block to the appropriate function to handle the matching rule, or the function leaves the pointer NULL.
Directory Server checks the parameter block after the factory function returns. If the factory function has set a function pointer in the parameter block, Directory Server updates its internal list. The function thus indicates that the plug-in supports the matching rule operation that is associated with the OID. Otherwise, the pointer remains NULL, and Directory Server tries the process again on the next matching rule plug-in that is registered.
If after calling all matching rule plug-ins, Directory Server has found no plug-in to handle the matching rule OID, the server returns LDAP_UNAVAILABLE_CRITICAL_EXTENSION to the client.
Directory Server frees the memory that was allocated for the operation.
Be aware that Directory Server calls plug-in factory functions for the purpose of extending the internal list of correspondences.