Hi Amit

Creating an AdaptorFactory is pretty straight forward.
Create an AdaptorFactoryClass which implements AdaptorFactory
and register it as OSGi Service. Set the properties "adaptables"
for the classes which may be adapted and the property "adapters"
for the classes to which the classes may be adapted to.
See a detailed description about Adaptable and AdatptorFactory
on [1].

[1] http://sling.apache.org/site/adapters.html

best regards
Mike


> Hey there, newbie to Sling (and OSGi) and was curious if
> someone could
> walk me through or point me at an example of creating an
> AdaptorFactory and registering it?
>
> Hopefully I'm even using the correct terms. Essentially would
> like to
> adapt resources to my own objects, e.g.: resource.adaptTo(Mine.class)
>
> thanks,
> Amit
>

Reply via email to