org.glassfish.hk2.classmodel.reflect
Interface ArchiveAdapter

All Superinterfaces:
Closeable
All Known Implementing Classes:
AbstractAdapter, DirectoryArchive, InputStreamArchiveAdapter, JarArchive

public interface ArchiveAdapter
extends Closeable

adapter for reading archive style structure

Author:
Jerome Dochez

Nested Class Summary
static class ArchiveAdapter.Entry
          Definition of an archive entry
static interface ArchiveAdapter.EntryTask
          defines the notion of an archive entry task which is a task aimed to be run on particular archive entry.
static interface ArchiveAdapter.Selector
           
 
Method Summary
 Manifest getManifest()
          Returns the manifest instance for the archive.
 URI getURI()
          Returns the URI of the archive
 void onAllEntries(ArchiveAdapter.EntryTask task, Logger logger)
          perform a task on each archive entry
 void onSelectedEntries(ArchiveAdapter.Selector selector, ArchiveAdapter.EntryTask task, Logger logger)
          perform a task on selected archive entries
 
Methods inherited from interface java.io.Closeable
close
 

Method Detail

getURI

URI getURI()
Returns the URI of the archive

Returns:
URI of the archive

getManifest

Manifest getManifest()
                     throws IOException
Returns the manifest instance for the archive.

Returns:
the archive's manifest
Throws:
IOException - if the manifest cannot be loaded.

onAllEntries

void onAllEntries(ArchiveAdapter.EntryTask task,
                  Logger logger)
                  throws IOException
perform a task on each archive entry

Parameters:
task - the task to perform
logger - 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 perform
logger - for any logging activity
Throws:
IOException - can be generated while reading the archive entries


Copyright © 2013 Oracle Corporation. All Rights Reserved.