public DefaultRetryCallable(final BackgroundExceptionCallable<T> delegate, final BackgroundActionState cancel) { this(delegate, new DisabledProgressListener(), cancel); }
private Space getSpaceShellPrompt(final Path directory) throws BackgroundException { final ThreadLocal<Space> quota = new ThreadLocal<Space>(); new SFTPCommandFeature(session).send(String.format("df -Pk %s | awk '{print $3, $4}'", directory.getAbsolute()), new DisabledProgressListener(), new TranscriptListener() { @Override
private <T> T connected(final Connected<T> run, final LoginCallback prompt) throws BackgroundException { new LoginConnectionService(prompt, new DisabledHostKeyCallback(), PasswordStoreFactory.get(), new DisabledProgressListener()) .check(session, PathCache.empty(), new DisabledCancelCallback()); return run.call(); }
}, new DisabledProgressListener(), new TransferBackgroundActionState(overall)).call());
}, new DisabledProgressListener()); return new ReadReplyOutputStream(out, status);
@Override public InputStream read(final Path file, final TransferStatus status, final ConnectionCallback callback) throws BackgroundException { try { if(!session.getClient().setFileType(FTP.BINARY_FILE_TYPE)) { throw new FTPException(session.getClient().getReplyCode(), session.getClient().getReplyString()); } if(status.isAppend()) { session.getClient().setRestartOffset(status.getOffset()); } final InputStream in = new DataConnectionActionExecutor(session).data(new DataConnectionAction<InputStream>() { @Override public InputStream execute() throws BackgroundException { try { return session.getClient().retrieveFileStream(file.getAbsolute()); } catch(IOException e) { throw new FTPExceptionMappingService().map(e); } } }, new DisabledProgressListener()); return new ReadReplyInputStream(in, status); } catch(IOException e) { throw new FTPExceptionMappingService().map("Download {0} failed", e, file); } }