Class UpdateMetadataFromURLPeriodicWork

  • All Implemented Interfaces:
    ExtensionPoint, Runnable

    @Extension
    public class UpdateMetadataFromURLPeriodicWork
    extends AsyncAperiodicWork

    This periodic work update the IdP Metadata File, the periodicof the execution is defined on the SAML Plugin configuration.

    If the Preriod is set to 0 the Periodic work is mostly disabled, it will check the changes on config every 10 minutes to see if it is enabled again, if the period change it is re-enabled again.

    • Field Detail

      • INITIAL_DELAY_PROPERTY

        public static final String INITIAL_DELAY_PROPERTY
        property to set the initial delay of the AsyncAperiodicWork. -Dorg.jenkinsci.plugins.saml.UpdateMetadataFromURLPeriodicWork.initialDelay=MILLISECONDS
      • INITIAL_DELAY

        public static final long INITIAL_DELAY
    • Constructor Detail

      • UpdateMetadataFromURLPeriodicWork

        public UpdateMetadataFromURLPeriodicWork()
    • Method Detail

      • getRecurrencePeriod

        public long getRecurrencePeriod()
        Specified by:
        getRecurrencePeriod in class AperiodicWork
        Returns:
        the configured period, if the configured period is 0 return 10 minutes, if we are starting the Jenkins instance schedule an execution after 10 seconds.
      • execute

        protected void execute​(TaskListener listener)

        Connect to the URL configured on the SAML configuration to get the IdP Metadata, then download it

        if the period configured is 0 it returns directly, do nothing.

        Specified by:
        execute in class AsyncAperiodicWork