/** * Executable a retryable object. * @param h the retry hander. * @param r the object that should be retried until it succeeds * or the number of retrys is reached. * @param descr a description of the command that is being run. * @throws IOException if there is a problem. */ protected void executeRetryable(RetryHandler h, Retryable r, String descr) throws IOException { h.execute(r, descr); }
RetryHandler h = new RetryHandler(this.retriesAllowed, this); if (action == RM_DIR) {
RetryHandler h = new RetryHandler(this.retriesAllowed, this); if (action == RM_DIR) {
RetryHandler h = new RetryHandler(this.retriesAllowed, this); if (action == RM_DIR) {
/** * Executable a retryable object. * @param h the retry handler. * @param r the object that should be retried until it succeeds * or the number of retrys is reached. * @param descr a description of the command that is being run. * @throws IOException if there is a problem. */ protected void executeRetryable(RetryHandler h, Retryable r, String descr) throws IOException { h.execute(r, descr); }
RetryHandler h = new RetryHandler(this.retriesAllowed, this); final FTPClient lftp = ftp; executeRetryable(h, new Retryable() { RetryHandler h = new RetryHandler(this.retriesAllowed, this); final FTPClient lftp = ftp; executeRetryable(h, new Retryable() { RetryHandler h = new RetryHandler(this.retriesAllowed, this); final FTPClient lftp = ftp; executeRetryable(h, new Retryable() { RetryHandler h = new RetryHandler(this.retriesAllowed, this); final FTPClient lftp = ftp; executeRetryable(h, new Retryable() {
/** * Executable a retryable object. * @param h the retry handler. * @param r the object that should be retried until it succeeds * or the number of retries is reached. * @param descr a description of the command that is being run. * @throws IOException if there is a problem. */ protected void executeRetryable(RetryHandler h, Retryable r, String descr) throws IOException { h.execute(r, descr); }
RetryHandler h = new RetryHandler(task.getRetriesAllowed(), task); if (task.getAction() == FTPTask.RM_DIR) {
/** * Executable a retryable object. * @param h the retry handler. * @param r the object that should be retried until it succeeds * or the number of retries is reached. * @param descr a description of the command that is being run. * @throws IOException if there is a problem. */ protected void executeRetryable(RetryHandler h, Retryable r, String descr) throws IOException { h.execute(r, descr); }
executeRetryable(new RetryHandler(this.retriesAllowed, this), () -> doSiteCommand(lftp, FTP.this.initialSiteCommand), "initial site command: " + this.initialSiteCommand); executeRetryable(new RetryHandler(this.retriesAllowed, this), () -> doSiteCommand(lftp, "umask " + umask), "umask " + umask); executeRetryable(new RetryHandler(this.retriesAllowed, this), () -> makeRemoteDir(lftp, remotedir), remotedir); } else if (action == SITE_CMD) { final FTPClient lftp = ftp; executeRetryable(new RetryHandler(this.retriesAllowed, this), () -> doSiteCommand(lftp, FTP.this.siteCommand), "Site Command: " + this.siteCommand);
RetryHandler h = new RetryHandler(this.retriesAllowed, this); final FTPClient lftp = ftp; executeRetryable(h, new Retryable() { RetryHandler h = new RetryHandler(this.retriesAllowed, this); final FTPClient lftp = ftp; executeRetryable(h, new Retryable() { RetryHandler h = new RetryHandler(this.retriesAllowed, this); final FTPClient lftp = ftp; executeRetryable(h, new Retryable() { RetryHandler h = new RetryHandler(this.retriesAllowed, this); final FTPClient lftp = ftp; executeRetryable(h, new Retryable() {
executeRetryable(new RetryHandler(task.getRetriesAllowed(), task), () -> doSiteCommand(lftp, task.getInitialSiteCommand()), "initial site command: " + task.getInitialSiteCommand()); final FTPClient lftp = ftp; executeRetryable( new RetryHandler(task.getRetriesAllowed(), task), () -> doSiteCommand(lftp, "umask " + task.getUmask()), "umask " + task.getUmask()); final FTPClient lftp = ftp; executeRetryable( new RetryHandler(task.getRetriesAllowed(), task), () -> makeRemoteDir(lftp, task.getRemotedir()), task.getRemotedir()); final FTPClient lftp = ftp; executeRetryable( new RetryHandler(task.getRetriesAllowed(), task), () -> doSiteCommand(lftp, task.getSiteCommand()), "Site Command: " + task.getSiteCommand());