org.jvnet.hk2.osgiadapter
Class OSGiDirectoryBasedRepository
java.lang.Object
com.sun.enterprise.module.common_impl.AbstractRepositoryImpl
com.sun.enterprise.module.common_impl.DirectoryBasedRepository
org.jvnet.hk2.osgiadapter.OSGiDirectoryBasedRepository
- All Implemented Interfaces:
- Repository
public class OSGiDirectoryBasedRepository
- extends DirectoryBasedRepository
Only OSGi bundles are recognized as modules.
- Author:
- Sanjeeb.Sahoo@Sun.COM
Methods inherited from class com.sun.enterprise.module.common_impl.AbstractRepositoryImpl |
add, addLibrary, find, findAll, findAll, getJarLocations, getLocation, getName, remove, removeLibrary, removeListener, toString |
OSGiDirectoryBasedRepository
public OSGiDirectoryBasedRepository(String name,
File repository)
OSGiDirectoryBasedRepository
public OSGiDirectoryBasedRepository(String name,
File repository,
boolean isTimerThreadDaemon)
initialize
public void initialize()
throws IOException
- Description copied from interface:
Repository
- Initialize the repository for use. This need to be called at least
once before any find methods is invoked.
- Specified by:
initialize
in interface Repository
- Overrides:
initialize
in class AbstractRepositoryImpl
- Throws:
IOException
- if an error occur accessing the repository
loadJar
protected ModuleDefinition loadJar(File jar)
throws IOException
- This class overrides this mthod, because we don't support the following cases:
1. external manifest.mf file for a jar file
2. jar file exploded as a directory.
Both the cases are supported in HK2, but not in OSGi.
- Overrides:
loadJar
in class AbstractRepositoryImpl
- Parameters:
jar
- bundle jar
- Returns:
- a ModuleDefinition for this bundle
- Throws:
IOException
newModuleDefinition
protected ModuleDefinition newModuleDefinition(File jar,
Attributes attr)
throws IOException
- Description copied from class:
AbstractRepositoryImpl
- Extensibility point for subclasses to create a different instance
of
ModuleDefinition
.
- Overrides:
newModuleDefinition
in class AbstractRepositoryImpl
- Parameters:
jar
- The module jar file for which ModuleDefinition
will be created.
Never null.
- Throws:
IOException
getProperty
protected String getProperty(String property)
Copyright © 2013 Oracle Corporation. All Rights Reserved.