|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This interface represents an individual cached bundle in the bundle cache. Oscar uses this interface to access all information about the associated bundle's cached information. Classes that implement this interface will be related to a specific implementation of the BundleCache interface.
BundleCache
Method Summary | |
java.lang.String |
findLibrary(int revision,
java.lang.String libName)
Returns the absolute file path for the specified native library of the specified revision of the bundle associated with this archive. |
BundleActivator |
getActivator(java.lang.ClassLoader loader)
Returns the persistent bundle activator of the bundle associated with this archive; this is a non-standard OSGi method that is only called when Oscar is running in non-strict OSGi mode. |
java.lang.String[] |
getClassPath(int revision)
Returns an array of Strings that represent the class path of the specified revision of the bundle associated with this archive. |
java.io.File |
getDataFile(java.lang.String fileName)
Returns an appropriate data file for the bundle associated with the archive using the supplied file name. |
long |
getId()
Returns the identifier of the bundle associated with this archive. |
java.lang.String |
getLocation()
Returns the location string of the bundle associated with this archive. |
java.util.Map |
getManifestHeader(int revision)
Returns the main attributes of the JAR file manifest header of the specified revision of the bundle associated with this archive. |
int |
getPersistentState()
Returns the persistent state of the bundle associated with the archive; this value will be either Bundle.INSTALLED or Bundle.ACTIVE. |
int |
getRevisionCount()
Returns the number of revisions of the bundle associated with the archive. |
int |
getStartLevel()
Returns the start level of the bundle associated with this archive. |
void |
setActivator(java.lang.Object obj)
Sets the persistent bundle activator of the bundle associated with this archive; this is a non-standard OSGi method that is only called when Oscar is running in non-strict OSGi mode. |
void |
setPersistentState(int state)
Sets the persistent state of the bundle associated with this archive; this value will be either Bundle.INSTALLED or Bundle.ACTIVE. |
void |
setStartLevel(int level)
Sets the start level of the bundle associated with this archive. |
Method Detail |
public long getId()
Returns the identifier of the bundle associated with this archive.
public java.lang.String getLocation() throws java.lang.Exception
Returns the location string of the bundle associated with this archive.
java.lang.Exception
- if any error occurs.public int getPersistentState() throws java.lang.Exception
Returns the persistent state of the bundle associated with the archive; this value will be either Bundle.INSTALLED or Bundle.ACTIVE.
java.lang.Exception
- if any error occurs.public void setPersistentState(int state) throws java.lang.Exception
Sets the persistent state of the bundle associated with this archive; this value will be either Bundle.INSTALLED or Bundle.ACTIVE.
state
- the new bundle state to write to the archive.
java.lang.Exception
- if any error occurs.public int getStartLevel() throws java.lang.Exception
Returns the start level of the bundle associated with this archive.
java.lang.Exception
- if any error occurs.public void setStartLevel(int level) throws java.lang.Exception
Sets the start level of the bundle associated with this archive.
level
- the new bundle start level to write to the archive.
java.lang.Exception
- if any error occurs.public java.io.File getDataFile(java.lang.String fileName) throws java.lang.Exception
Returns an appropriate data file for the bundle associated with the archive using the supplied file name.
java.lang.Exception
- if any error occurs.public BundleActivator getActivator(java.lang.ClassLoader loader) throws java.lang.Exception
Returns the persistent bundle activator of the bundle associated with this archive; this is a non-standard OSGi method that is only called when Oscar is running in non-strict OSGi mode.
loader
- the class loader to use when trying to instantiate
the bundle activator.
java.lang.Exception
- if any error occurs.public void setActivator(java.lang.Object obj) throws java.lang.Exception
Sets the persistent bundle activator of the bundle associated with this archive; this is a non-standard OSGi method that is only called when Oscar is running in non-strict OSGi mode.
obj
- the new persistent bundle activator to write to the archive.
java.lang.Exception
- if any error occurs.public int getRevisionCount() throws java.lang.Exception
Returns the number of revisions of the bundle associated with the archive. When a bundle is updated, the previous version of the bundle is maintained along with the new revision until old revisions are purged. The revision count reflects how many revisions of the bundle are currently available in the cache.
java.lang.Exception
- if any error occurs.public java.util.Map getManifestHeader(int revision) throws java.lang.Exception
Returns the main attributes of the JAR file manifest header of the specified revision of the bundle associated with this archive. The returned map should be case insensitive.
revision
- the specified revision.
java.lang.Exception
- if any error occurs.public java.lang.String[] getClassPath(int revision) throws java.lang.Exception
Returns an array of Strings that represent the class path of the specified revision of the bundle associated with this archive. Currently, these values are restricted to absolute paths in the file system, but this may be lifted in the future (perhaps they should be ResourceSources from the Module Loader.
revision
- the specified revision.
java.lang.Exception
- if any error occurs.public java.lang.String findLibrary(int revision, java.lang.String libName) throws java.lang.Exception
Returns the absolute file path for the specified native library of the specified revision of the bundle associated with this archive.
revision
- the specified revision.libName
- the name of the library.
java.lang.Exception
- if any error occurs.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |