public interface InstallerFactory
PackageOperations. Will also add appropriate PackageOperation.StatusChangeListeners via a InstallerFactory.StatusChangeListenerFactory.| Modifier and Type | Interface and Description |
|---|---|
static interface |
InstallerFactory.StatusChangeListenerFactory
A class that can create a list of appropriate listeners for an installer/uninstaller.
|
| Modifier and Type | Method and Description |
|---|---|
Installer |
createInstaller(RemotePackage p,
RepoManager mgr,
Downloader downloader,
FileOp fop)
Canonical way to create instances of
Installer. |
Uninstaller |
createUninstaller(LocalPackage p,
RepoManager mgr,
FileOp fop)
Canonical way to create instances of
Uninstaller. |
void |
setFallbackFactory(InstallerFactory fallback)
If a factory can't itself create an installer for a given package, it will try again using
the given
fallback, if provided. |
void |
setListenerFactory(InstallerFactory.StatusChangeListenerFactory listenerFactory)
Sets the factory used to generate the list of listeners added to the generated installers/
uninstallers.
|
@NonNull Installer createInstaller(@NonNull RemotePackage p, @NonNull RepoManager mgr, @NonNull Downloader downloader, @NonNull FileOp fop)
Installer.@NonNull Uninstaller createUninstaller(@NonNull LocalPackage p, @NonNull RepoManager mgr, @NonNull FileOp fop)
Uninstaller.void setListenerFactory(@NonNull
InstallerFactory.StatusChangeListenerFactory listenerFactory)
void setFallbackFactory(@Nullable
InstallerFactory fallback)
fallback, if provided.
If an operation fails, the operation can contain a reference to an operation created by the
fallback factory to facilitate retrying the install.