hudson.remoting
Interface DelegatingCallable<V,T extends java.lang.Throwable>
- All Superinterfaces:
- Callable<V,T>, java.io.Serializable
public interface DelegatingCallable<V,T extends java.lang.Throwable>
- extends Callable<V,T>
Callable
that nominates another claassloader for serialization.
For various reasons, one Callable
object (and all the objects reachable from it) is
serialized by one classloader.
By default, the classloader that loaded Callable
object itself is used,
but when Callable
object refers to other objects that are loaded by other classloaders,
this will fail to deserialize on the remote end.
In such a case, implement this interface, instead of plain Callable
and
return a classloader that can see all the classes.
In case of Hudson, PluginManager.uberClassLoader
is a good candidate.
- Author:
- Kohsuke Kawaguchi
Methods inherited from interface hudson.remoting.Callable |
call |
getClassLoader
java.lang.ClassLoader getClassLoader()
Copyright © 2012. All Rights Reserved.