OSGi™ Service Platform
Core Specification

Release 4 Version 4.3

org.osgi.framework.wiring
Interface BundleRequirement


public interface BundleRequirement

A requirement that has been declared from a bundle revision.

ThreadSafe
Consumers of this API must not implement this interface

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 getRevision()
          Returns the bundle revision declaring this requirement.
 boolean matches(BundleCapability capability)
          Returns whether the specified capability matches this requirement.
 

Method Detail

getNamespace

java.lang.String getNamespace()
Returns the name space of this 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.

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.

Returns:
An unmodifiable map of attribute names to attribute values for this requirement, or an empty map if this requirement has no attributes.

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.

OSGi™ Service Platform
Core Specification

Release 4 Version 4.3

Copyright © OSGi Alliance (2000, 2012). All Rights Reserved. Licensed under the OSGi Specification License, Version 2.0