/** * Method must be called after provider construction. It creates the refresh timer and refreshes the metadata for * the first time. * * @throws MetadataProviderException error */ public final void afterPropertiesSet() throws MetadataProviderException { Assert.notNull(keyManager, "KeyManager must be set"); // Create timer if needed if (refreshCheckInterval > 0) { log.debug("Creating metadata reload timer with interval {}", refreshCheckInterval); this.timer = new Timer("Metadata-reload", true); this.timer.schedule(new RefreshTask(), refreshCheckInterval, refreshCheckInterval); } else { log.debug("Metadata reload timer is not created, refreshCheckInternal is {}", refreshCheckInterval); } refreshMetadata(); }