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=xxx&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 java.lang.String
IDIR_DIRECTORYID_KEY
The key used in the query part of the URI whose corresponding value identifies the directory to be returned.static java.lang.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.static java.lang.String
IDIR_SCHEME
The scheme for directory finder URI ids.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description IDirectory
retrieveIDirectory(java.net.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.
-
-
-
Field Detail
-
IDIR_SCHEME
static final java.lang.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:
- Constant Field Values
-
IDIR_FINDERID_KEY
static final java.lang.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:
- Constant Field Values
-
IDIR_DIRECTORYID_KEY
static final java.lang.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:
- Constant Field Values
-
-
Method Detail
-
retrieveIDirectory
IDirectory retrieveIDirectory(java.net.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.
-
-