Module org.glassfish.hk2.classmodel
Interface ArchiveAdapter
- All Superinterfaces:
AutoCloseable,Closeable
- All Known Implementing Classes:
AbstractAdapter,DirectoryArchive,InputStreamArchiveAdapter,JarArchive
adapter for reading archive style structure
- Author:
- Jerome Dochez
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classDefinition of an archive entrystatic interfacedefines the notion of an archive entry task which is a task aimed to be run on particular archive entry.static interface -
Method Summary
Modifier and TypeMethodDescriptionReturns the manifest instance for the archive.getURI()Returns the URI of the archivevoidonAllEntries(ArchiveAdapter.EntryTask task, Logger logger) perform a task on each archive entryvoidonSelectedEntries(ArchiveAdapter.Selector selector, ArchiveAdapter.EntryTask task, Logger logger) perform a task on selected archive entries
-
Method Details
-
getURI
URI getURI()Returns the URI of the archive- Returns:
- URI of the archive
-
getManifest
Returns the manifest instance for the archive.- Returns:
- the archive's manifest
- Throws:
IOException- if the manifest cannot be loaded.
-
onAllEntries
perform a task on each archive entry- Parameters:
task- the task to performlogger- for any logging activity- Throws:
IOException- can be generated while reading the archive entries
-
onSelectedEntries
void onSelectedEntries(ArchiveAdapter.Selector selector, ArchiveAdapter.EntryTask task, Logger logger) throws IOException perform a task on selected archive entries- Parameters:
selector- implementation to select the archive archive entries on which the task should be performed.task- the task to performlogger- for any logging activity- Throws:
IOException- can be generated while reading the archive entries
-