public abstract static class Repository.LocalProvider extends Object
Lookups.executeWith(org.openide.util.Lookup, java.lang.Runnable) to temporarily modify the default
Lookup contents and route Repository requests to a Repository private to some task. The
LocalProvider is responsible for caching and lifecycle of the Repository instance;
it can expire the Repository if the Provider's execution context terminates. Implementations
must be prepared to handle requests for Repository already shutdown etc.
|Constructor and Description
|Modifier and Type
|Method and Description
Allows to delay attaching filesystems to the Repository.
Returns the local repository instance.
public abstract Repository getRepository() throws IOException
null to indicate
the main Repository should be used. The method must return the very same instance
of Repository for the whole duration of the execution context. It must return the same
Repository instance even after the execution context shuts down; the contents of Repository and
its FileSystems may be limited in that case.
Implementations must be reentrant (a call to
getLocalRepository can be made during
construction of the Repository instance) and must not recurse infinitely.
protected final Repository delayFilesystemAttach(Callable<Repository> init) throws IOException
This method wraps the Repository creation so that the default FileSystem is attached after the repository is fully constructed. The `init' callable must create a new Repository instance. This method will then add the default FS for newly created repository instances.