Repository
that statically enumerates all ModuleDefinition
upfront.
| Modifier and Type | Field and Description |
|---|---|
| private List | |
| protected List | |
| private final URI | |
| private final ReentrantLock | |
| private Map | |
| private final String |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| protected void | |
| protected void | |
| public boolean | Returns: true if the listener was added successfullyimplementation listening to this repository changes listener)Implements com. Add a listener to changes happening to this repository. |
| public ModuleDefinition | find(String name, String version)
Implements com. Finds and returns a |
| public List | findAll()
Implements com. Returns a list of all modules available in this repository |
| public List | findAll(String name)
Implements com. Finds and returns a list of all the available versions of a module given its name. |
| public List | Returns: jar files location stored in this repository.Implements com. Returns the plain jar files installed in this repository. |
| public URI | getLocation()
Implements com. Returns the repository location |
| public String | |
| public void | initialize()
Implements com. Initialize the repository for use. |
| protected ModuleDefinition | loadJar(File
Either a jar file or a directory that has the same structure as a jar file. jar)Loads a jar file and builds a |
| protected abstract void | loadModuleDefs(Map<ModuleId, ModuleDefinition> moduleDefs, List<URI> libraries)
Called from |
| protected ModuleDefinition | newModuleDefinition(File
The module jar file for which jar, Attributes attr)ModuleDefinition will be created.
Never null.Extensibility point for subclasses to create a different instance
of |
| protected void | |
| protected void | |
| public boolean | Returns: true if the listener was successfully unregisteredthe previously registered listener listener)Implements com. Removes a previously registered listener |
| public void | |
| public String |
| libraries | back to summary |
|---|---|
| private List<URI> libraries | |
| listeners | back to summary |
|---|---|
| protected List<RepositoryChangeListener> listeners | |
| location | back to summary |
|---|---|
| private final URI location | |
| lock | back to summary |
|---|---|
| private final ReentrantLock lock | |
| moduleDefs | back to summary |
|---|---|
| private Map<ModuleId, ModuleDefinition> moduleDefs | |
| name | back to summary |
|---|---|
| private final String name | |
| AbstractRepositoryImpl | back to summary |
|---|---|
| public AbstractRepositoryImpl(String name, URI location) | |
| add | back to summary |
|---|---|
| protected void add(ModuleDefinition def) | |
| addLibrary | back to summary |
|---|---|
| protected void addLibrary(URI location) | |
| addListener | back to summary |
|---|---|
| public boolean addListener(RepositoryChangeListener listener) Implements com. Add a listener to changes happening to this repository. Repository can change during the lifetime of an execution (files added/removed/changed)
| |
| find | back to summary |
|---|---|
| public ModuleDefinition find(String name, String version) Implements com. Doc from com. Finds and returns a | |
| findAll | back to summary |
|---|---|
| public List Implements com. Doc from com. Returns a list of all modules available in this repository | |
| findAll | back to summary |
|---|---|
| public List Implements com. Doc from com. Finds and returns a list of all the available versions of a module given its name. | |
| getJarLocations | back to summary |
|---|---|
| public List Implements com. Returns the plain jar files installed in this repository. Plain jar files are not modules, they do not have the module's metadata and can only be used when referenced from a module dependency list or when added to a class loader directly | |
| getLocation | back to summary |
|---|---|
| public URI getLocation() Implements com. Doc from com. Returns the repository location | |
| getName | back to summary |
|---|---|
| public String getName() Implements com. Doc from com. Returns the repository name | |
| initialize | back to summary |
|---|---|
| public void initialize() throws IOException Implements com. Doc from com. Initialize the repository for use. This need to be called at least once before any find methods is invoked.
| |
| loadJar | back to summary |
|---|---|
| protected ModuleDefinition loadJar(File jar) throws IOException Loads a jar file and builds a
The system allows
| |
| loadModuleDefs | back to summary |
|---|---|
| protected abstract void loadModuleDefs(Map<ModuleId, ModuleDefinition> moduleDefs, List<URI> libraries) throws IOException Called from | |
| newModuleDefinition | back to summary |
|---|---|
| protected ModuleDefinition newModuleDefinition(File jar, Attributes attr) throws IOException Extensibility point for subclasses to create a different instance
of
| |
| remove | back to summary |
|---|---|
| protected void remove(ModuleDefinition def) | |
| removeLibrary | back to summary |
|---|---|
| protected void removeLibrary(URI location) | |
| removeListener | back to summary |
|---|---|
| public boolean removeListener(RepositoryChangeListener listener) Implements com. Removes a previously registered listener
| |
| shutdown | back to summary |
|---|---|
| public void shutdown() throws IOException Implements com. Doc from com. Shutdown the repository. After this call return, the find methods cannot be used until initialize() is called again.
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non- | |