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.

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().

Kind Regards,
Stefan

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

Reply via email to