/** convenience constructor to supply machine immediately */ public SshPutTaskFactory(SshMachineLocation machine, String remoteFile) { machine(machine); remoteFile(remoteFile); }
/** convenience constructor to supply machine immediately */ public SshFetchTaskFactory(SshMachineLocation machine, String remoteFile) { machine(machine); remoteFile(remoteFile); }
/** convenience for generating an {@link PlainSshExecTaskFactory} which can be further customised if desired, and then (it must be explicitly) queued */ public ProcessTaskFactory<Integer> ssh(String ...commands) { return SshTasks.newSshExecTaskFactory(machine(), commands); } }
SshPutTaskWrapper(SshPutTaskFactory constructor) { super(constructor); TaskBuilder<Void> tb = TaskBuilder.<Void>builder().dynamic(false).name(getSummary()); task = tb.body(new SshPutJob()).build(); }
@Override public Task<Void> asTask() { return getTask(); }
@Override public SshFetchTaskWrapper newTask() { dirty = false; return new SshFetchTaskWrapper(this); }
public SshPutTaskWrapper newTask() { dirty = false; return new SshPutTaskWrapper(this); }
@Override public Task<String> asTask() { return getTask(); }
public static SshPutTaskFactory newSshPutTaskFactory(SshMachineLocation machine, String remoteFile) { return new SshPutTaskFactory(machine, remoteFile); }
/** constructor where machine will be added later */ public SshPutTaskFactory(String remoteFile) { remoteFile(remoteFile); }
public SshPutTaskFactory remoteFile(String remoteFile) { this.remoteFile = remoteFile; return self(); }
/** constructor where machine will be added later */ public SshFetchTaskFactory(String remoteFile) { remoteFile(remoteFile); }
public SshFetchTaskFactory remoteFile(String remoteFile) { this.remoteFile = remoteFile; return self(); }
public static SshFetchTaskFactory newSshFetchTaskFactory(SshMachineLocation machine, String remoteFile) { return new SshFetchTaskFactory(machine, remoteFile); }
/** blocks until the task completes; does not throw */ public SshPutTaskWrapper block() { getTask().blockUntilEnded(); return this; }