org.apache.felix.framework
Class BundleRevisionImpl

java.lang.Object
  extended by org.apache.felix.framework.BundleRevisionImpl
All Implemented Interfaces:
BundleReference, BundleRevision

public class BundleRevisionImpl
extends java.lang.Object
implements BundleRevision


Field Summary
static int EAGER_ACTIVATION
           
static int LAZY_ACTIVATION
           
 
Fields inherited from interface org.osgi.framework.wiring.BundleRevision
BUNDLE_NAMESPACE, HOST_NAMESPACE, PACKAGE_NAMESPACE, TYPE_FRAGMENT
 
Constructor Summary
BundleRevisionImpl(Bundle bundle, java.lang.String id)
          This constructor is used by the extension manager, since it needs a constructor that does not throw an exception.
 
Method Summary
 Bundle getBundle()
          Returns the Bundle object associated with this BundleReference.
 Content getContent()
           
 java.util.List<BundleCapability> getDeclaredCapabilities(java.lang.String namespace)
          Returns the capabilities declared by this bundle revision.
 java.util.List<R4Library> getDeclaredNativeLibraries()
           
 java.util.List<BundleRequirement> getDeclaredRequirements(java.lang.String namespace)
          Returns the requirements declared by this bundle revision.
 java.net.URL getEntry(java.lang.String name)
           
 java.util.Map getHeaders()
           
 java.lang.String getId()
           
 java.io.InputStream getInputStream(int index, java.lang.String urlPath)
           
 java.net.URL getLocalURL(int index, java.lang.String urlPath)
           
 java.lang.String getManifestVersion()
           
 java.security.ProtectionDomain getProtectionDomain()
           
 java.lang.String getSymbolicName()
          Returns the symbolic name for this bundle revision.
 int getTypes()
          Returns the special types of this bundle revision.
 Version getVersion()
          Returns the version for this bundle revision.
 BundleWiring getWiring()
          Returns the bundle wiring which is using this bundle revision.
 boolean hasInputStream(int index, java.lang.String urlPath)
           
 boolean isExtension()
           
 void resolve(BundleWiringImpl wiring)
           
 void setProtectionDomain(java.security.ProtectionDomain pd)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

EAGER_ACTIVATION

public static final int EAGER_ACTIVATION
See Also:
Constant Field Values

LAZY_ACTIVATION

public static final int LAZY_ACTIVATION
See Also:
Constant Field Values
Constructor Detail

BundleRevisionImpl

public BundleRevisionImpl(Bundle bundle,
                          java.lang.String id)
This constructor is used by the extension manager, since it needs a constructor that does not throw an exception.

Parameters:
logger -
bundle -
id -
bootPkgs -
bootPkgWildcards -
Throws:
BundleException
Method Detail

getSymbolicName

public java.lang.String getSymbolicName()
Description copied from interface: BundleRevision
Returns the symbolic name for this bundle revision.

Specified by:
getSymbolicName in interface BundleRevision
Returns:
The symbolic name for this bundle revision.
See Also:
Bundle.getSymbolicName()

getVersion

public Version getVersion()
Description copied from interface: BundleRevision
Returns the version for this bundle revision.

Specified by:
getVersion in interface BundleRevision
Returns:
The version for this bundle revision, or Version.emptyVersion if this bundle revision has no version information.
See Also:
Bundle.getVersion()

getDeclaredCapabilities

public java.util.List<BundleCapability> getDeclaredCapabilities(java.lang.String namespace)
Description copied from interface: BundleRevision
Returns the capabilities declared by this bundle revision.

Specified by:
getDeclaredCapabilities in interface BundleRevision
Parameters:
namespace - The name space of the declared capabilities to return or null to return the declared capabilities from all name spaces.
Returns:
A list containing a snapshot of the declared BundleCapabilitys, or an empty list if this bundle revision declares no capabilities in the specified name space. The list contains the declared capabilities in the order they are specified in the manifest.

getDeclaredRequirements

public java.util.List<BundleRequirement> getDeclaredRequirements(java.lang.String namespace)
Description copied from interface: BundleRevision
Returns the requirements declared by this bundle revision.

Specified by:
getDeclaredRequirements in interface BundleRevision
Parameters:
namespace - The name space of the declared requirements to return or null to return the declared requirements from all name spaces.
Returns:
A list containing a snapshot of the declared BundleRequirements, or an empty list if this bundle revision declares no requirements in the specified name space. The list contains the declared requirements in the order they are specified in the manifest.

getTypes

public int getTypes()
Description copied from interface: BundleRevision
Returns the special types of this bundle revision. The bundle revision type values are: A bundle revision may be more than one type at a time. A type code is used to identify the bundle revision type for future extendability.

If this bundle revision is not one or more of the defined types then 0 is returned.

Specified by:
getTypes in interface BundleRevision
Returns:
The special types of this bundle revision. The type values are ORed together.

getWiring

public BundleWiring getWiring()
Description copied from interface: BundleRevision
Returns the bundle wiring which is using this bundle revision.

Specified by:
getWiring in interface BundleRevision
Returns:
The bundle wiring which is using this bundle revision or null if no bundle wiring is using this bundle revision.
See Also:
BundleWiring.getRevision()

getBundle

public Bundle getBundle()
Description copied from interface: BundleReference
Returns the Bundle object associated with this BundleReference.

Specified by:
getBundle in interface BundleReference
Returns:
The Bundle object associated with this BundleReference.

getHeaders

public java.util.Map getHeaders()

isExtension

public boolean isExtension()

getManifestVersion

public java.lang.String getManifestVersion()

getDeclaredNativeLibraries

public java.util.List<R4Library> getDeclaredNativeLibraries()

getId

public java.lang.String getId()

resolve

public void resolve(BundleWiringImpl wiring)

setProtectionDomain

public void setProtectionDomain(java.security.ProtectionDomain pd)

getProtectionDomain

public java.security.ProtectionDomain getProtectionDomain()

getContent

public Content getContent()

getEntry

public java.net.URL getEntry(java.lang.String name)

hasInputStream

public boolean hasInputStream(int index,
                              java.lang.String urlPath)

getInputStream

public java.io.InputStream getInputStream(int index,
                                          java.lang.String urlPath)
                                   throws java.io.IOException
Throws:
java.io.IOException

getLocalURL

public java.net.URL getLocalURL(int index,
                                java.lang.String urlPath)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 2012. All Rights Reserved.