Class DndGroovyClassLoader
java.lang.Object
java.lang.ClassLoader
io.deephaven.enterprise.dnd.classloader.DndGroovyClassLoader
- Direct Known Subclasses:
ControllerClientClassLoader
Despite class name, this class doesn't extend the Groovy class loader, but rather handles getting Groovy script
resources. Subclasses will vary in how scripts are retrieved and stored locally.
-
Method Summary
Modifier and TypeMethodDescription@Nullable URL
getResource
(String name) static ControllerClientClassLoader
setDndClassLoader
(@NotNull File cacheDir, @NotNull Database database, @Nullable String scriptLoaderStateJson, @NotNull ControllerClientFactory controllerClientFactory) Set custom DnD class loader to retrieve Groovy scripts on imports over the network from DHE workspace data and controller script loader.Methods inherited from class java.lang.ClassLoader
clearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, findClass, findClass, findLibrary, findLoadedClass, findResource, findResource, findResources, findSystemClass, getClassLoadingLock, getDefinedPackage, getDefinedPackages, getName, getPackage, getPackages, getParent, getPlatformClassLoader, getResourceAsStream, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, getUnnamedModule, isRegisteredAsParallelCapable, loadClass, loadClass, registerAsParallelCapable, resolveClass, resources, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSigners
-
Method Details
-
setDndClassLoader
public static ControllerClientClassLoader setDndClassLoader(@NotNull @NotNull File cacheDir, @NotNull @NotNull Database database, @Nullable @Nullable String scriptLoaderStateJson, @NotNull @NotNull ControllerClientFactory controllerClientFactory) Set custom DnD class loader to retrieve Groovy scripts on imports over the network from DHE workspace data and controller script loader.Class loader should be set before creating the DHC Groovy session so that its class loaders are children to this one.
- Parameters:
cacheDir
- where retrieved remote Groovy scripts will be cacheddatabase
- required to get notebooksscriptLoaderStateJson
- required for consistent script state if e.g. PQ contextcontrollerClientFactory
- theControllerClientFactory
to use- Returns:
- controller client class loader intended for script session to invalidate cache on new commands; note that this is not the class loader installed to the current thread
-
getResource
- Overrides:
getResource
in classClassLoader
-