Top Description Methods
org.osgi.resource

public Interface Wiring

Known Direct Subinterfaces
org.osgi.framework.wiring.BundleWiring
Annotations
@ConsumerType
Imports
java.util.List, org.osgi.annotation.versioning.ConsumerType

A wiring for a resource. A wiring is associated with a resource and represents the dependencies with other wirings.

Instances of this type must be effectively immutable. That is, for a given instance of this interface, the methods defined by this interface must always return the same result.

Author
$Id: 935272fa914a9cc0020549c43a3857acad2c45cc $

Method Summary

Modifier and TypeMethod and Description
public List<Wire>

Returns:

A list containing a snapshot of the Wires for the capabilities of this wiring, or an empty list if this wiring has no capabilities in the specified namespace. For a given namespace, the list contains the wires in the order the capabilities were specified in the manifests of the resource and the attached fragment resources of this wiring. There is no ordering defined between capabilities in different namespaces.
getProvidedResourceWires
(String
The namespace of the capabilities for which to return wires or null to return the wires for the capabilities in all namespaces.
namespace
)

Returns the Wires to the provided capabilities of this wiring.

public List<Wire>

Returns:

A list containing a snapshot of the Wires for the requirements of this wiring, or an empty list if this wiring has no requirements in the specified namespace. For a given namespace, the list contains the wires in the order the requirements were specified in the manifests of the resource and the attached fragment resources of this wiring. There is no ordering defined between requirements in different namespaces.
getRequiredResourceWires
(String
The namespace of the requirements for which to return wires or null to return the wires for the requirements in all namespaces.
namespace
)

Returns the Wires to the requirements in use by this wiring.

public Resource

Returns:

The resource associated with this wiring.
getResource
()

Returns the resource associated with this wiring.

public List<Capability>

Returns:

A list containing a snapshot of the Capabilitys, or an empty list if this wiring provides no capabilities in the specified namespace. For a given namespace, the list contains the capabilities in the order the capabilities were specified in the manifests of the resource and the attached fragment resources† of this wiring. There is no ordering defined between capabilities in different namespaces.
getResourceCapabilities
(String
The namespace of the capabilities to return or null to return the capabilities from all namespaces.
namespace
)

Returns the capabilities provided by this wiring.

public List<Requirement>

Returns:

A list containing a snapshot of the Requirements, or an empty list if this wiring uses no requirements in the specified namespace. For a given namespace, the list contains the requirements in the order the requirements were specified in the manifests of the resource and the attached fragment resources of this wiring. There is no ordering defined between requirements in different namespaces.
getResourceRequirements
(String
The namespace of the requirements to return or null to return the requirements from all namespaces.
namespace
)

Returns the requirements of this wiring.

Method Detail

getProvidedResourceWiresback to summary
public List<Wire> getProvidedResourceWires(String namespace)

Returns the Wires to the provided capabilities of this wiring.

Parameters
namespace:String

The namespace of the capabilities for which to return wires or null to return the wires for the capabilities in all namespaces.

Returns:List<Wire>

A list containing a snapshot of the Wires for the capabilities of this wiring, or an empty list if this wiring has no capabilities in the specified namespace. For a given namespace, the list contains the wires in the order the capabilities were specified in the manifests of the resource and the attached fragment resources of this wiring. There is no ordering defined between capabilities in different namespaces.

getRequiredResourceWiresback to summary
public List<Wire> getRequiredResourceWires(String namespace)

Returns the Wires to the requirements in use by this wiring.

Parameters
namespace:String

The namespace of the requirements for which to return wires or null to return the wires for the requirements in all namespaces.

Returns:List<Wire>

A list containing a snapshot of the Wires for the requirements of this wiring, or an empty list if this wiring has no requirements in the specified namespace. For a given namespace, the list contains the wires in the order the requirements were specified in the manifests of the resource and the attached fragment resources of this wiring. There is no ordering defined between requirements in different namespaces.

getResourceback to summary
public Resource getResource()

Returns the resource associated with this wiring.

Returns:Resource

The resource associated with this wiring.

getResourceCapabilitiesback to summary
public List<Capability> getResourceCapabilities(String namespace)

Returns the capabilities provided by this wiring.

Only capabilities considered by the resolver are returned. For example, capabilities with effective directive not equal to resolve are not returned.

A capability may not be required by any wiring and thus there may be no wires for the capability.

A wiring for a non-fragment resource provides a subset of the declared capabilities from the resource and all attached fragment resources†. Not all declared capabilities may be provided since some may be discarded. For example, if a package is declared to be both exported and imported, only one is selected and the other is discarded.

A wiring for a fragment resource with a symbolic name must provide exactly one osgi.identity capability.

† The osgi.identity capability provided by attached fragment resource must not be included in the capabilities of the host wiring.

Parameters
namespace:String

The namespace of the capabilities to return or null to return the capabilities from all namespaces.

Returns:List<Capability>

A list containing a snapshot of the Capabilitys, or an empty list if this wiring provides no capabilities in the specified namespace. For a given namespace, the list contains the capabilities in the order the capabilities were specified in the manifests of the resource and the attached fragment resources† of this wiring. There is no ordering defined between capabilities in different namespaces.

getResourceRequirementsback to summary
public List<Requirement> getResourceRequirements(String namespace)

Returns the requirements of this wiring.

Only requirements considered by the resolver are returned. For example, requirements with effective directive not equal to resolve are not returned.

A wiring for a non-fragment resource has a subset of the declared requirements from the resource and all attached fragment resources. Not all declared requirements may be present since some may be discarded. For example, if a package is declared to be optionally imported and is not actually imported, the requirement must be discarded.

Parameters
namespace:String

The namespace of the requirements to return or null to return the requirements from all namespaces.

Returns:List<Requirement>

A list containing a snapshot of the Requirements, or an empty list if this wiring uses no requirements in the specified namespace. For a given namespace, the list contains the requirements in the order the requirements were specified in the manifests of the resource and the attached fragment resources of this wiring. There is no ordering defined between requirements in different namespaces.