Interface IDirectoryFinder


public interface IDirectoryFinder
Provides a means by which a virtual directory can be cached and returned on demand.

A typical scenario for this interface is to implement it as a service which is used to hold virtual directories containing application installation artifacts, with this directory being retrieved when required during application installation (a URI identifying the virtual directory having been passed to the installation code).

Implementing classes should use URIs of the form idirfinder://?finderID=xxxinvalid input: '&directoryID'=yyy where the finder ID within the query part of the URI may be used to assist in determining the directory finder instance that can retrieve the virtual directory identified by the directory ID part (or alternatively, the URI as a whole). When implemented as a service, a directory finder should configure a corresponding service property of "finderID=xxx".

  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    The key used in the query part of the URI whose corresponding value identifies the directory to be returned.
    static final String
    The key used in the query part of the URI whose corresponding value assists in identifying the directory finder to be used.
    static final String
    The scheme for directory finder URI ids.
  • Method Summary

    Modifier and Type
    Method
    Description
    Get the directory that corresponds to the given identifier, and remove it from the cache, or return null if no corresponding directory is found.
  • Field Details

    • IDIR_SCHEME

      static final String IDIR_SCHEME
      The scheme for directory finder URI ids. Using this scheme enables code receiving such a URI to infer that it is intended for use with a IDirectoryFinder instance.

      See Also:
    • IDIR_FINDERID_KEY

      static final String IDIR_FINDERID_KEY
      The key used in the query part of the URI whose corresponding value assists in identifying the directory finder to be used.

      See Also:
    • IDIR_DIRECTORYID_KEY

      static final String IDIR_DIRECTORYID_KEY
      The key used in the query part of the URI whose corresponding value identifies the directory to be returned.

      See Also:
  • Method Details

    • retrieveIDirectory

      IDirectory retrieveIDirectory(URI id)
      Get the directory that corresponds to the given identifier, and remove it from the cache, or return null if no corresponding directory is found.

      As the found directory is removed, it is not subsequently retrievable by re-issuing the request.

      Parameters:
      id - a URI that identifies the desired directory.
      Returns:
      IDirectory instance that corresponds to the given id URI, or null if unknown.