'. '

NetbinoxHook

From APIDesign

Revision as of 15:37, 29 January 2011 by JaroslavTulach (Talk | contribs)
Jump to: navigation, search

Netbinox is fully compatible OSGi container built around Equinox. It's goal is to be fully compatible for complient OSGi bundles. However Equinox offers more than just OSGi APIs. It offers various extension hooks. Version 1.16.7 of Netbinox exposes these hooks too, however as there are certain problems BootstrappingEquinox, it exposes them in slightly different way.

First of all the Netbinox itself needs to register few hooks to achieve the improvements to the NetbinoxPerformance. Those include class loading hook, bundle file factory hook, framework log and adaptor hook. However since version 1.16.7 the Netbinox also queries for additional hook configurators using ServiceLoader injection style:

for (HookConfigurator hc : Lookup.getDefault().lookupAll(HookConfigurator.class)) {
  hc.addHooks(hr);
}

This means that anyone can create a NetBeans module, add dependency on org.apidesign.netbinox version at least 1.16.7 and implement Equinox's own HookConfigurator. The configurator's addHooks method can then register what ever additional hooks one needs.

Personal tools
buy