Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[osgi-users] Trying to apply Capabilities and Requirements in another context

I would like to apply the Resource/Capability/Requirement model (and the Resolver implementation) outside of an OSGi bundle/resource resolution context.

I.e. to describe capabilities and requirements in an application domain model and use the Resolver to validate/obtain a consistent set of application things.

 

When looking at the interface definitions of Capability and Requirement, I was wondering why they both exist separately, as their structure is identical.

I.e. an alternative would be to have one type "Capability" and on Resource have :

 

       List<Capability> getCapabilities(String namespace);

       List<Capability> getRequirements(String namespace);

 

I didn't find too much info on actual implementations of both interfaces.

Filters seem to be specific for Requirements but are also stored in the attributes map which exists on Capability as well.

 

Can anyone give some more info on why they both exist and if there are some guidelines on how to implement/apply them?

 

thanks

erwin

 

 


Back to the top