Package hudson.remoting
Interface JarLoader
-
public interface JarLoader
Remoting interface to allow the other side to retrieve a jar file from the checksum advertised inResourceImageInJar
.Channel
exposes this as a remote property under the keyOURS
, then once retrieved we store it in a local property underTHEIRS
.- Since:
- 2.24
- Author:
- Kohsuke Kawaguchi
-
-
Field Summary
Fields Modifier and Type Field Description static String
OURS
static ChannelProperty<JarLoader>
THEIRS
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
isPresentOnRemote(hudson.remoting.Checksum sum)
Used by the local side to see if the jar file of the given checksum is already present on the other side.void
notifyJarPresence(long[] sums)
void
notifyJarPresence(long sum1, long sum2)
Called by the other side to notify that they already own the jar file of the given checksum.void
writeJarTo(long sum1, long sum2, OutputStream sink)
Retrieve the jar file image.
-
-
-
Field Detail
-
OURS
static final String OURS
-
THEIRS
static final ChannelProperty<JarLoader> THEIRS
-
-
Method Detail
-
writeJarTo
void writeJarTo(long sum1, long sum2, OutputStream sink) throws IOException, InterruptedException
Retrieve the jar file image. This method is called by the other side to receive the jar file. This call implicitly has the effect ofnotifyJarPresence(long, long)
- Parameters:
sink
- This stream receives the jar file.- Throws:
InterruptedException
- Since this is a remote call, if the calling thread gets interrupted while waiting for the completion of the call, this exception will be thrown.IOException
-
notifyJarPresence
@Asynchronous void notifyJarPresence(long sum1, long sum2)
Called by the other side to notify that they already own the jar file of the given checksum. This allows this side to sendResourceImageRef
smartly by avoiding unnecessary image transport.
-
notifyJarPresence
@Asynchronous void notifyJarPresence(long[] sums)
- Parameters:
sums
- Array of even length. sums[2i] and sumes[2i+1] are paired up and interpreted as one checksum.
-
isPresentOnRemote
boolean isPresentOnRemote(hudson.remoting.Checksum sum)
Used by the local side to see if the jar file of the given checksum is already present on the other side. Used to decide if the class file image gets sent to the remote or not.
-
-