Suet pudding resource
Lemon pudding resource
Suet bundle resource
Figure 7.2 Resource repositories may contain resources of any type including, but not restricted to,
bundles. Two resources may share a symbolic name and version as long as they're different types.
Requirements and capabilities
As with a Resource , both a Requirement and a Capability are generic objects that
can be used to express any dependency or exposed feature. As such, they're more
than capable of expressing the potential range of bundle dependencies and features.
Requirements and capabilities define a namespace, which is like the type of the
osgi.identity capability, indicating what sorts of things they require and provide.
Requirements and capabilities are related in that a capability can satisfy a requirement
if it meets three rules (see figure 7.3):
The requirement and capability share a namespace.
The requirement's filter matches the attributes of the capability.
Any relevant directives are satisfied. We'll cover these in more detail in section 7.1.3.
Requirements and capabilities share a similar structure. They both expose the following:
A link back to the resource
that owns this requirement or
A namespace. A particular
resource may define require-
ments and capabilities from
many namespaces. Critically, a
capability and requirement
can only match if they're in the
A set of attributes that
describe the required or pro-
vided feature. The attributes
for a requirement are used to
Figure 7.3 A requirement is satisfied by a capability if
that capability is of a matching namespace, provides the
attributes needed by the requirement, and has no con-
Search WWH ::