On 24/06/2021 06:25, Stefan Seelmann wrote:
On 6/24/21 4:10 AM, Shawn McKinney wrote:
The debugger tells me that api request controls are loaded in 
[StockCodecFactoryUtil](https://github.com/apache/directory-ldap-api/blob/master/ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/StockCodecFactoryUtil.java)

So, I added my RelaxControl into the api code space, and added this blurb to 
StockCodecFactoryUtil class:

```
ControlFactory<RelaxControl> relaxControlFactory = new RelaxControlFactory( 
apiService );
requestControlFactories.put( relaxControlFactory.getOid(), relaxControlFactory 
);
```

Once registered the control is found by the runtime and things become … well 
Relaxed ;-)

I'm not sure if the control should be placed into api-ldap-codec-core or
better api-ldap-extras-codec (there's a ExtrasCodecFactoryUtil to
register controls) which contains, well, non-core control. Feel free to
commit it, then we can include it in the next release.

Definitively in extra-codec.



The other option, if you don't want to add it to the LDAP API, is to
register it in Fortress. You can get a handle to the registries via
LdapNetworkConnection.getCodecService().registerRequestControl().

Indeed. But I think it better fits the extra-codec part of the API, as it's not related to Fortress (it's a LDAP draft).


--
*Emmanuel Lécharny - CTO* 205 Promenade des Anglais – 06200 NICE
T. +33 (0)4 89 97 36 50
P. +33 (0)6 08 33 32 61
emmanuel.lecha...@busit.com https://www.busit.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: api-unsubscr...@directory.apache.org
For additional commands, e-mail: api-h...@directory.apache.org

Reply via email to