Class BundleInstaller
- java.lang.Object
-
- org.esa.snap.core.gpf.descriptor.dependency.BundleInstaller
-
- All Implemented Interfaces:
AutoCloseable
public class BundleInstaller extends Object implements AutoCloseable
Installer class for adapter bundles.- Since:
- 5.0.4
-
-
Constructor Summary
Constructors Constructor Description BundleInstaller(ToolAdapterOperatorDescriptor descriptor)
Creates an installer for the given adapter descriptor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
void
install(boolean async)
Install the bundle (if any) of the current adapter operator.static boolean
isBundleFileAvailable(Bundle bundle)
Checks if a bundle file (archive or installer) is present.void
setCallback(Callable<Void> completionCallback)
Sets a callback to be invoked when the execution completes.void
setProgressMonitor(ProgressMonitor monitor)
Sets a progress monitor for this installer.
-
-
-
Constructor Detail
-
BundleInstaller
public BundleInstaller(ToolAdapterOperatorDescriptor descriptor)
Creates an installer for the given adapter descriptor.- Parameters:
descriptor
- The adapter descriptor
-
-
Method Detail
-
isBundleFileAvailable
public static boolean isBundleFileAvailable(Bundle bundle)
Checks if a bundle file (archive or installer) is present.- Parameters:
bundle
- The bundle to be checked
-
setProgressMonitor
public void setProgressMonitor(ProgressMonitor monitor)
Sets a progress monitor for this installer.- Parameters:
monitor
- The progress monitor
-
setCallback
public void setCallback(Callable<Void> completionCallback)
Sets a callback to be invoked when the execution completes.- Parameters:
completionCallback
- The completion callback
-
install
public void install(boolean async)
Install the bundle (if any) of the current adapter operator.- Parameters:
async
- Iftrue
, installation will be done on a separate thread.
-
close
public void close() throws Exception
- Specified by:
close
in interfaceAutoCloseable
- Throws:
Exception
-
-