All Downloads are FREE. Search and download functionalities are using the official Maven repository.

uk.gov.ida.saml.metadata.MetadataRefreshTask Maven / Gradle / Ivy

There is a newer version: 3.4.6-277
Show newest version
package uk.gov.ida.saml.metadata;

import io.dropwizard.servlets.tasks.Task;
import org.opensaml.saml.metadata.resolver.MetadataResolver;
import org.opensaml.saml.metadata.resolver.impl.AbstractReloadingMetadataResolver;

import javax.inject.Inject;
import java.io.PrintWriter;
import java.util.List;
import java.util.Map;

public class MetadataRefreshTask extends Task {
    private AbstractReloadingMetadataResolver metadataProvider;

    @Inject
    public MetadataRefreshTask(MetadataResolver metadataProvider) {
        super("metadata-refresh");
        this.metadataProvider = (AbstractReloadingMetadataResolver) metadataProvider;
    }

    @Override
    public void execute(Map> parameters, PrintWriter output) throws Exception {
        metadataProvider.refresh();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy