@Override public X509Certificate choose(String[] keyTypes, final Principal[] issuers, final Host bookmark, final String prompt) throws ConnectionCanceledException { throw new ConnectionCanceledException(prompt); } }
@Override public void configure(final boolean enable, final Path file) throws BackgroundException { throw new ConnectionCanceledException(); } }
private String wrap(final String input) throws ConnectionCanceledException { if(null == input) { throw new ConnectionCanceledException(); } return input; }
private char[] wrap(final char[] input) throws ConnectionCanceledException { if(null == input) { throw new ConnectionCanceledException(); } return input; } }
@Override public void warn(final Host bookmark, final String title, final String message, final String continueButton, final String disconnectButton, final String preference) throws ConnectionCanceledException { throw new ConnectionCanceledException(); }
@Override public void verify() throws ConnectionCanceledException { if(SessionBackgroundAction.this.isCanceled()) { throw new ConnectionCanceledException(); } } });
@Override public void verify() throws ConnectionCanceledException { if(callback.isCanceled()) { throw new ConnectionCanceledException(); } } });
@Override public void chunk(final Path parent, final AttributedList<Path> list) throws ConnectionCanceledException { if(log.isInfoEnabled()) { log.info(String.format("Retrieved chunk of %d items in %s", list.size(), directory)); } if(worker.isCanceled()) { throw new ConnectionCanceledException(); } proxy.chunk(directory, list); }
@Override public Boolean run(final Session<?> session) throws BackgroundException { final UnixPermission feature = session.getFeature(UnixPermission.class); for(Path file : files) { if(this.isCanceled()) { throw new ConnectionCanceledException(); } final Permission merged = permissions.get(file); this.write(session, feature, file, merged); } return true; }
@Override public Set<Encryption.Algorithm> run(final Session<?> session) throws BackgroundException { final Encryption feature = session.getFeature(Encryption.class); final Set<Encryption.Algorithm> keys = new HashSet<>(); for(Path file : this.getContainers(files)) { if(this.isCanceled()) { throw new ConnectionCanceledException(); } keys.addAll(feature.getKeys(file, prompt)); } return keys; }
@Override public List<Path> run(final Session<?> session) throws BackgroundException { final Versioning feature = session.getFeature(Versioning.class); for(Path file : files) { if(this.isCanceled()) { throw new ConnectionCanceledException(); } feature.revert(file); } return files; }
@Override public Void run() throws BackgroundException { session.evict(); if(session == SessionPool.DISCONNECTED) { throw new ConnectionCanceledException(); } PathPasteboardFactory.delete(session.getHost()); return null; }
@Override public Boolean run(final Session<?> session) throws BackgroundException { final Redundancy feature = session.getFeature(Redundancy.class); for(Path file : files) { if(this.isCanceled()) { throw new ConnectionCanceledException(); } this.write(session, feature, file); } return true; }
@Override public Boolean run(final Session<?> session) throws BackgroundException { final Metadata feature = session.getFeature(Metadata.class); for(Path file : files) { if(this.isCanceled()) { throw new ConnectionCanceledException(); } this.write(session, feature, file); } return true; }
@Override public Boolean run(final Session<?> session) throws BackgroundException { final Encryption feature = session.getFeature(Encryption.class); for(Path file : files) { if(this.isCanceled()) { throw new ConnectionCanceledException(); } this.write(session, feature, file); } return true; }
@Override public Boolean run(final Session<?> session) throws BackgroundException { final Versioning feature = session.getFeature(Versioning.class); for(Path file : this.getContainers(files)) { if(this.isCanceled()) { throw new ConnectionCanceledException(); } this.write(feature, file); } return true; }
@Override public Boolean run(final Session<?> session) throws BackgroundException { final Lifecycle feature = session.getFeature(Lifecycle.class); for(Path file : this.getContainers(files)) { if(this.isCanceled()) { throw new ConnectionCanceledException(); } this.write(feature, file); } return true; }
@Override public Boolean run(final Session<?> session) throws BackgroundException { final Logging feature = session.getFeature(Logging.class); for(Path file : this.getContainers(files)) { if(this.isCanceled()) { throw new ConnectionCanceledException(); } this.write(feature, file); } return true; }
@Override public Boolean run(final Session<?> session) throws BackgroundException { final DistributionConfiguration feature = session.getFeature(DistributionConfiguration.class); for(Path file : this.getContainers(files)) { if(this.isCanceled()) { throw new ConnectionCanceledException(); } write(feature, file); } return true; }
@Override public Boolean run(final Session<?> session) throws BackgroundException { final DistributionConfiguration cdn = session.getFeature(DistributionConfiguration.class); final Purge feature = cdn.getFeature(Purge.class, method); for(Path file : this.getContainers(files)) { if(this.isCanceled()) { throw new ConnectionCanceledException(); } feature.invalidate(file, method, files, prompt); } return true; }