Package aQute.libg.remote.source
Class RemoteSource
- java.lang.Object
-
- aQute.libg.remote.source.RemoteSource
-
- All Implemented Interfaces:
Source
public class RemoteSource extends java.lang.Object implements Source
Controls a different file system trough a Sink. It can translate files with local absolute file paths to remote absolute file paths (also if it is a windows system). It also detects changes in the local file system and will update the remote. Updates are checked for SHAs so we only transfer the files when they really are not there, even allowing a remote SHA cache to do its magic.
-
-
Constructor Summary
Constructors Constructor Description RemoteSource()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(java.io.File file)
void
cancel()
void
close()
Closevoid
event(Event e, Area area)
byte[]
getData(java.lang.String sha)
Called from the remote sink to get the data when it lacks the given sha.Sink
getSink()
void
join()
void
launch(java.util.Map<java.lang.String,java.lang.String> env, java.util.List<java.lang.String> args, java.io.InputStream stdin, java.lang.Appendable stdout, java.lang.Appendable stderr)
void
open(Sink sink, java.io.File cwd, java.lang.String areaId)
void
output(java.lang.String areaId, java.lang.CharSequence text, boolean err)
void
sync()
void
update(java.io.File f)
-
-
-
Method Detail
-
open
public void open(Sink sink, java.io.File cwd, java.lang.String areaId)
-
getData
public byte[] getData(java.lang.String sha) throws java.lang.Exception
Called from the remote sink to get the data when it lacks the given sha.
-
close
public void close() throws java.io.IOException
Close- Throws:
java.io.IOException
-
output
public void output(java.lang.String areaId, java.lang.CharSequence text, boolean err) throws java.io.IOException
-
getSink
public Sink getSink()
-
launch
public void launch(java.util.Map<java.lang.String,java.lang.String> env, java.util.List<java.lang.String> args, java.io.InputStream stdin, java.lang.Appendable stdout, java.lang.Appendable stderr) throws java.lang.Exception
- Throws:
java.lang.Exception
-
cancel
public void cancel() throws java.lang.Exception
- Throws:
java.lang.Exception
-
update
public void update(java.io.File f) throws java.lang.Exception
- Throws:
java.lang.Exception
-
sync
public void sync() throws java.lang.Exception
- Throws:
java.lang.Exception
-
add
public void add(java.io.File file) throws java.lang.Exception
- Throws:
java.lang.Exception
-
join
public void join() throws java.lang.InterruptedException
- Throws:
java.lang.InterruptedException
-
-