Skip to main content

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

Thanks a lot Tom and David.

I'll check these out.

 

kind regards

erwin

 

From: osgi-users <osgi-users-bounces@xxxxxxxxxxx> On Behalf Of Thomas Watson
Sent: Friday, 9 April 2021 15:12
To: osgi-users@xxxxxxxxxxx
Subject: Re: [osgi-users] Trying to apply Capabilities and Requirements in another context

 

Equinox also has a concept of a module container that can model resources/requirements/capabilities without creating the OSGi Framework instance:

 


Tom
 

 

 

----- Original message -----
From: David Bosschaert <david.bosschaert@xxxxxxxxx>
Sent by: "osgi-users" <osgi-users-bounces@xxxxxxxxxxx>
To: "This is a community mail list for OSGi technology. Any OSGi technical discussion or questions are acceptable here." <osgi-users@xxxxxxxxxxx>
Cc:
Subject: [EXTERNAL] Re: [osgi-users] Trying to apply Capabilities and Requirements in another context
Date: Thu, Apr 8, 2021 2:55 PM
 

Hi Erwin,

 

If you're just using for reusable implementations, you could also use the ones from Felix Utils: https://github.com/apache/felix-dev/tree/master/utils/src/main/java/org/apache/felix/utils/resource

 

 

Kind regards,

 

David

 

On Thu, 8 Apr 2021 at 18:23, <erwindl0@xxxxxxxxx> wrote:

Thanks Tim, BJ.

 

I'm not a native English-speaker, and was thinking more in the lines of : a requirement is a "required capability", where the capability is the entity/concept and the requirement is a "role".

But replies are fine for me, I'll now check for more info on implementing them in a relevant way.

 

cheers

erwin

 

 

From: osgi-users <osgi-users-bounces@xxxxxxxxxxx> On Behalf Of BJ Hargrave
Sent: Thursday, 8 April 2021 18:11
To: osgi-users@xxxxxxxxxxx
Subject: Re: [osgi-users] Trying to apply Capabilities and Requirements in another context

 

They are different Java types since they are different entities in the model. A requirement is not a capability and a capability is not a requirement. Using different java types prevents passing a capability to a method which really wants a requirement. It helps programmers avoid such mistakes.

--

BJ Hargrave
Senior Technical Staff Member, IBM // office: +1 386 848 1781
OSGi Fellow and OSGi Specification Project lead // mobile: +1 386 848 3788
hargrave@xxxxxxxxxx

 

 

----- Original message -----
From: <erwindl0@xxxxxxxxx>
Sent by: "osgi-users" <osgi-users-bounces@xxxxxxxxxxx>
To: "'This is a community mail list for OSGi technology. Any OSGi technical discussion or questions are acceptable here.'" <osgi-users@xxxxxxxxxxx>
Cc:
Subject: [EXTERNAL] [osgi-users] Trying to apply Capabilities and Requirements in another context
Date: Thu, Apr 8, 2021 11:41
 

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

 

 

_______________________________________________
osgi-users mailing list
osgi-users@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/osgi-users

 

 

_______________________________________________
osgi-users mailing list
osgi-users@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/osgi-users

_______________________________________________
osgi-users mailing list
osgi-users@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/osgi-users

 

 


Back to the top