Knopflerfish OSGi 5.2.0

org.osgi.service.resolver
Interface HostedCapability

All Superinterfaces:
Capability

public interface HostedCapability
extends Capability

A capability hosted by a resource.

A HostedCapability is a Capability where the getResource() method returns a Resource that hosts this Capability instead of declaring it. This is necessary for cases where the declaring Resource of a Capability does not match the runtime state. For example, this is the case for fragments attached to a host. Most fragment declared capabilities and requirements become hosted by the host resource. Since a fragment can attach to multiple hosts, a single capability can actually be hosted multiple times.

Author:
$Id: ef2183bdd379da6d1a2adc6f6c4719b847c279d2 $
ThreadSafe
Consumers of this API must not implement this interface

Method Summary
 Capability getDeclaredCapability()
          Return the Capability hosted by the Resource.
 Resource getResource()
          Return the Resource that hosts this Capability.
 
Methods inherited from interface org.osgi.resource.Capability
equals, getAttributes, getDirectives, getNamespace, hashCode
 

Method Detail

getResource

Resource getResource()
Return the Resource that hosts this Capability.

Specified by:
getResource in interface Capability
Returns:
The Resource that hosts this Capability.

getDeclaredCapability

Capability getDeclaredCapability()
Return the Capability hosted by the Resource.

Returns:
The Capability hosted by the Resource.

Knopflerfish OSGi 5.2.0