public void containersChanged( ContainerConfig config, Collection<String> changed, Collection<String> removed) { Map<String, BlobCrypter> newCrypters = Maps.newHashMap(crypters); Map<String, String> newDomains = Maps.newHashMap(domains); Map<String, Integer> newTokenTTLs = Maps.newHashMap(tokenTTLs); try { loadContainers(config, changed, newCrypters, newDomains, newTokenTTLs); for (String container : removed) { newCrypters.remove(container); newDomains.remove(container); newTokenTTLs.remove(container); } } catch (IOException e) { // Someone specified securityTokenKeyFile, but we couldn't load the key. // Keep the old configuration. LOG.log(Level.WARNING, "There was an error loading an updated container configuration. " + "Keeping old configuration.", e); return; } crypters = newCrypters; domains = newDomains; tokenTTLs = newTokenTTLs; }
public void containersChanged( ContainerConfig config, Collection<String> changed, Collection<String> removed) { Map<String, BlobCrypter> newCrypters = Maps.newHashMap(crypters); Map<String, String> newDomains = Maps.newHashMap(domains); Map<String, Integer> newTokenTTLs = Maps.newHashMap(tokenTTLs); try { loadContainers(config, changed, newCrypters, newDomains, newTokenTTLs); for (String container : removed) { newCrypters.remove(container); newDomains.remove(container); newTokenTTLs.remove(container); } } catch (IOException e) { // Someone specified securityTokenKeyFile, but we couldn't load the key. // Keep the old configuration. LOG.log(Level.WARNING, "There was an error loading an updated container configuration. " + "Keeping old configuration.", e); return; } crypters = newCrypters; domains = newDomains; tokenTTLs = newTokenTTLs; }
@Inject public BlobCrypterSecurityTokenCodec(ContainerConfig config) { try { config.addConfigObserver(this, false); loadContainers(config, config.getContainers(), crypters, domains, tokenTTLs); } catch (IOException e) { // Someone specified securityTokenKeyFile, but we couldn't load the key. That merits killing // the server. LOG.log(Level.SEVERE, "Error while initializing BlobCrypterSecurityTokenCodec", e); throw new RuntimeException(e); } }
public void containersChanged( ContainerConfig config, Collection<String> changed, Collection<String> removed) { Map<String, BlobCrypter> newCrypters = Maps.newHashMap(crypters); Map<String, String> newDomains = Maps.newHashMap(domains); Map<String, Integer> newTokenTTLs = Maps.newHashMap(tokenTTLs); try { loadContainers(config, changed, newCrypters, newDomains, newTokenTTLs); for (String container : removed) { newCrypters.remove(container); newDomains.remove(container); newTokenTTLs.remove(container); } } catch (IOException e) { // Someone specified securityTokenKeyFile, but we couldn't load the key. // Keep the old configuration. LOG.log(Level.WARNING, "There was an error loading an updated container configuration. " + "Keeping old configuration.", e); return; } crypters = newCrypters; domains = newDomains; tokenTTLs = newTokenTTLs; }
@Inject public BlobCrypterSecurityTokenCodec(ContainerConfig config) { try { config.addConfigObserver(this, false); loadContainers(config, config.getContainers(), crypters, domains, tokenTTLs); } catch (IOException e) { // Someone specified securityTokenKeyFile, but we couldn't load the key. That merits killing // the server. LOG.log(Level.SEVERE, "Error while initializing BlobCrypterSecurityTokenCodec", e); throw new RuntimeException(e); } }
@Inject public BlobCrypterSecurityTokenCodec(ContainerConfig config) { try { config.addConfigObserver(this, false); loadContainers(config, config.getContainers(), crypters, domains, tokenTTLs); } catch (IOException e) { // Someone specified securityTokenKeyFile, but we couldn't load the key. That merits killing // the server. LOG.log(Level.SEVERE, "Error while initializing BlobCrypterSecurityTokenCodec", e); throw new RuntimeException(e); } }