@Test(expected = LoginCanceledException.class) public void testReadMissingCredentials() throws Exception { final Host bookmark = new Host(new TestProtocol(), "myhost.localdomain"); final CustomOriginCloudFrontDistributionConfiguration configuration = new CustomOriginCloudFrontDistributionConfiguration(bookmark, new DefaultX509TrustManager(), new DefaultX509KeyManager()); final Path container = new Path("test-us-east-1-cyberduck", EnumSet.of(Path.Type.directory, Path.Type.volume)); configuration.read(container, Distribution.CUSTOM, new DisabledLoginCallback()); }
@Override public Distribution read(final Path file, final Distribution.Method method, final LoginCallback prompt) throws BackgroundException { final Distribution distribution = this.connected(new Connected<Distribution>() { @Override public Distribution call() throws BackgroundException { return CustomOriginCloudFrontDistributionConfiguration.super.read(file, method, prompt); } }, prompt); cache.put(containerService.getContainer(file), distribution); return distribution; }
CustomOriginCloudFrontDistributionConfiguration extends CloudFrontDistributionConfiguration { @Override public Distribution read(final Path file, final Distribution.Method method, final LoginCallback prompt) throws BackgroundException { final Distribution distribution = this.connected(new Connected<Distribution>() { @Override public Distribution call() throws BackgroundException { return CustomOriginCloudFrontDistributionConfiguration.super.read(file, method, prompt); } }, prompt); cache.put(containerService.getContainer(file), distribution); return distribution; } }
CustomOriginCloudFrontDistributionConfiguration extends CloudFrontDistributionConfiguration { @Override public Distribution read(final Path file, final Distribution.Method method, final LoginCallback prompt) throws BackgroundException { final Distribution distribution = this.connected(new Connected<Distribution>() { @Override public Distribution call() throws BackgroundException { return CustomOriginCloudFrontDistributionConfiguration.super.read(file, method, prompt); } }, prompt); cache.put(containerService.getContainer(file), distribution); return distribution; } CustomOriginCloudFrontDistributionConfiguration(final Host origin,
                                                           final X509TrustManager trust,
                                                           final X509KeyManager key); }
CustomOriginCloudFrontDistributionConfiguration extends CloudFrontDistributionConfiguration { @Override public Distribution read(final Path file, final Distribution.Method method, final LoginCallback prompt) throws BackgroundException { final Distribution distribution = this.connected(new Connected<Distribution>() { @Override public Distribution call() throws BackgroundException { return CustomOriginCloudFrontDistributionConfiguration.super.read(file, method, prompt); } }, prompt); cache.put(containerService.getContainer(file), distribution); return distribution; } CustomOriginCloudFrontDistributionConfiguration(final Host origin,
                                                           final X509TrustManager trust,
                                                           final X509KeyManager key); @Override Distribution read(final Path file, final Distribution.Method method, final LoginCallback prompt); @Override void write(final Path file, final Distribution distribution, final LoginCallback prompt); @Override List<Distribution.Method> getMethods(final Path container); @Override DescriptiveUrlBag toUrl(final Path file); }
CustomOriginCloudFrontDistributionConfiguration extends CloudFrontDistributionConfiguration { @Override public Distribution read(final Path file, final Distribution.Method method, final LoginCallback prompt) throws BackgroundException { final Distribution distribution = this.connected(new Connected<Distribution>() { @Override public Distribution call() throws BackgroundException { return CustomOriginCloudFrontDistributionConfiguration.super.read(file, method, prompt); } }, prompt); cache.put(containerService.getContainer(file), distribution); return distribution; } CustomOriginCloudFrontDistributionConfiguration(final Host origin,
                                                           final X509TrustManager trust,
                                                           final X509KeyManager key); @Override Distribution read(final Path file, final Distribution.Method method, final LoginCallback prompt); @Override void write(final Path file, final Distribution distribution, final LoginCallback prompt); @Override List<Distribution.Method> getMethods(final Path container); @Override DescriptiveUrlBag toUrl(final Path file);  }