org.ungoverned.oscar
Class OSGiLibrarySource

java.lang.Object
  extended by org.ungoverned.oscar.OSGiLibrarySource
All Implemented Interfaces:
LibrarySource

public class OSGiLibrarySource
extends java.lang.Object
implements LibrarySource


Constructor Summary
OSGiLibrarySource(BundleCache cache, long bundleId, int revision, java.lang.String os, java.lang.String processor, LibraryInfo[] libraries)
           
 
Method Summary
 void close()
           This method de-initializes the library source.
 java.lang.String getPath(java.lang.String name)
           Returns a file system path to the specified library.
 void open()
           This method initializes the library source.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OSGiLibrarySource

public OSGiLibrarySource(BundleCache cache,
                         long bundleId,
                         int revision,
                         java.lang.String os,
                         java.lang.String processor,
                         LibraryInfo[] libraries)
Method Detail

open

public void open()
Description copied from interface: LibrarySource

This method initializes the library source. It is called when the associated module is added to the ModuleManager. It is acceptable for implementations to ignore duplicate calls to this method if the library source is already opened.

Specified by:
open in interface LibrarySource

close

public void close()
Description copied from interface: LibrarySource

This method de-initializes the library source. It is called when the associated module is removed from the ModuleManager or when the module is reset by the ModuleManager.

Specified by:
close in interface LibrarySource

getPath

public java.lang.String getPath(java.lang.String name)
                         throws java.lang.IllegalStateException
Description copied from interface: LibrarySource

Returns a file system path to the specified library.

Specified by:
getPath in interface LibrarySource
Parameters:
name - the name of the library that is being requested.
Returns:
a file system path to the specified library.
Throws:
java.lang.IllegalStateException - if the resource source has not been opened.