org.osgi.framework.wiring
Interface BundleRequirement

All Superinterfaces:
Requirement

public interface BundleRequirement
extends Requirement

A requirement that has been declared from a bundle revision.

Version:
$Id: bb292dc1bbd9f707652de164beb319867323785f $

Method Summary
 java.util.Map<java.lang.String,java.lang.Object> getAttributes()
          Returns the attributes of this requirement.
 java.util.Map<java.lang.String,java.lang.String> getDirectives()
          Returns the directives of this requirement.
 java.lang.String getNamespace()
          Returns the name space of this requirement.
 BundleRevision getResource()
          Returns the resource declaring this requirement.
 BundleRevision getRevision()
          Returns the bundle revision declaring this requirement.
 boolean matches(BundleCapability capability)
          Returns whether the specified capability matches this requirement.
 
Methods inherited from interface org.osgi.framework.resource.Requirement
matches
 

Method Detail

getRevision

BundleRevision getRevision()
Returns the bundle revision declaring this requirement.

Returns:
The bundle revision declaring this requirement.

matches

boolean matches(BundleCapability capability)
Returns whether the specified capability matches this requirement.

Parameters:
capability - The capability to match to this requirement.
Returns:
true if the specified capability has the same name space as this requirement and the filter for this requirement matches the attributes of the specified capability; false otherwise.

getNamespace

java.lang.String getNamespace()
Returns the name space of this requirement.

Specified by:
getNamespace in interface Requirement
Returns:
The name space of this requirement.

getDirectives

java.util.Map<java.lang.String,java.lang.String> getDirectives()
Returns the directives of this requirement.

Only the following list of directives have specified semantics:

All other directives have no specified semantics and are considered extra user defined information. The OSGi Alliance reserves the right to extend the set of directives which have specified semantics.

Specified by:
getDirectives in interface Requirement
Returns:
An unmodifiable map of directive names to directive values for this requirement, or an empty map if this requirement has no directives.

getAttributes

java.util.Map<java.lang.String,java.lang.Object> getAttributes()
Returns the attributes of this requirement.

Requirement attributes have no specified semantics and are considered extra user defined information.

Specified by:
getAttributes in interface Requirement
Returns:
An unmodifiable map of attribute names to attribute values for this requirement, or an empty map if this requirement has no attributes.

getResource

BundleRevision getResource()
Returns the resource declaring this requirement.

This method returns the same value as getRevision().

Specified by:
getResource in interface Requirement
Returns:
The resource declaring this requirement.
Since:
1.1


Copyright © 2006-2012 The Apache Software Foundation. All Rights Reserved.