public class SimpleUserCodeClassLoader extends Object implements UserCodeClassLoader
UserCodeClassLoader
implementation which assumes that the provided class loader
will never be released and, hence, will never execute the release hooks.Modifier and Type | Method and Description |
---|---|
ClassLoader |
asClassLoader()
Obtains the actual class loader.
|
static SimpleUserCodeClassLoader |
create(ClassLoader classLoader) |
void |
registerReleaseHookIfAbsent(String releaseHookName,
Runnable releaseHook)
Registers a release hook which is being executed before the user code class loader is being
released.
|
public ClassLoader asClassLoader()
UserCodeClassLoader
asClassLoader
in interface UserCodeClassLoader
public void registerReleaseHookIfAbsent(String releaseHookName, Runnable releaseHook)
UserCodeClassLoader
registerReleaseHookIfAbsent
in interface UserCodeClassLoader
releaseHook
- releaseHook which is executed before the user code class loader is being
released.public static SimpleUserCodeClassLoader create(ClassLoader classLoader)
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.