Class ScheduledResourcePropertiesDecorator

    • Constructor Detail

      • ScheduledResourcePropertiesDecorator

        public ScheduledResourcePropertiesDecorator​(ResourceProperties aProperties)
                                             throws java.io.IOException,
                                                    java.text.ParseException,
                                                    java.lang.IllegalStateException
        Constructs the ScheduledResourcePropertiesDecorator wrapping the given ResourceProperties with default settings being a poll loop time of 10 seconds (as of PollLoopTime.NORM and orphan removal (as of AbstractResourcePropertiesDecorator.reload(ReloadMode) being called with true). The scheduling Thread is started as daemon thread (see ThreadMode.DAEMON). Immediately starts polling after construction of this instance for new properties.
        Parameters:
        aProperties - The properties from which the properties are to be reloaded periodically.
        Throws:
        java.io.IOException - thrown in case accessing the resource encountered an I/O problem.
        java.lang.IllegalStateException - in case the attached resource does not support reloading.
        java.text.ParseException - Signals that an error has been reached unexpectedly while parsing the data to be loaded.
      • ScheduledResourcePropertiesDecorator

        public ScheduledResourcePropertiesDecorator​(ResourceProperties aProperties,
                                                    int aScheduleTimeInMillis)
                                             throws java.io.IOException,
                                                    java.text.ParseException,
                                                    java.lang.IllegalStateException
        Constructs the ScheduledResourcePropertiesDecorator wrapping the given ResourceProperties with setting the given poll loop time and orphan removal (as of AbstractResourcePropertiesDecorator.reload(ReloadMode) being called with true). The scheduling Thread is started as daemon thread (see ThreadMode.DAEMON). Immediately starts polling after construction of this instance for new properties.
        Parameters:
        aProperties - The properties from which the properties are to be reloaded periodically.
        aScheduleTimeInMillis - The time in milliseconds between polling for new properties.
        Throws:
        java.io.IOException - thrown in case accessing the resource encountered an I/O problem.
        java.lang.IllegalStateException - in case the attached resource does not support reloading.
        java.text.ParseException - Signals that an error has been reached unexpectedly while parsing the data to be loaded.
      • ScheduledResourcePropertiesDecorator

        public ScheduledResourcePropertiesDecorator​(ResourceProperties aProperties,
                                                    ReloadMode aReloadMode)
                                             throws java.io.IOException,
                                                    java.text.ParseException,
                                                    java.lang.IllegalStateException
        Constructs the ScheduledResourcePropertiesDecorator wrapping the given ResourceProperties with setting the the default poll loop time of 10 seconds (as of PollLoopTime.NORM and the given orphan removal strategy (as of AbstractResourcePropertiesDecorator.reload(ReloadMode) being called with your argument). The scheduling Thread is started as daemon thread (see ThreadMode.DAEMON). Immediately starts polling after construction of this instance for new properties.
        Parameters:
        aProperties - The properties from which the properties are to be reloaded periodically.
        aReloadMode - when set to ReloadMode.ORPHAN_REMOVAL, then properties existing in the attached resource but not(!) in the Properties itself are(!) removed. Else properties not existing in the attached resource are kept.
        Throws:
        java.io.IOException - thrown in case accessing the resource encountered an I/O problem.
        java.lang.IllegalStateException - in case the attached resource does not support reloading.
        java.text.ParseException - Signals that an error has been reached unexpectedly while parsing the data to be loaded.
      • ScheduledResourcePropertiesDecorator

        public ScheduledResourcePropertiesDecorator​(ResourceProperties aProperties,
                                                    int aScheduleTimeInMillis,
                                                    ReloadMode aReloadMode)
                                             throws java.io.IOException,
                                                    java.text.ParseException,
                                                    java.lang.IllegalStateException
        Constructs the ScheduledResourcePropertiesDecorator wrapping the given ResourceProperties with setting the given poll loop time and the given orphan removal strategy (as of AbstractResourcePropertiesDecorator.reload(ReloadMode) being called with your argument). The scheduling Thread is started as daemon thread (see ThreadMode.DAEMON). Immediately starts polling after construction of this instance for new properties.
        Parameters:
        aProperties - The properties from which the properties are to be reloaded periodically.
        aScheduleTimeInMillis - The time in milliseconds between polling for new properties.
        aReloadMode - when set to ReloadMode.ORPHAN_REMOVAL, then properties existing in the attached resource but not(!) in the Properties itself are(!) removed. Else properties not existing in the attached resource are kept.
        Throws:
        java.io.IOException - thrown in case accessing the resource encountered an I/O problem.
        java.lang.IllegalStateException - in case the attached resource does not support reloading.
        java.text.ParseException - Signals that an error has been reached unexpectedly while parsing the data to be loaded.
      • ScheduledResourcePropertiesDecorator

        public ScheduledResourcePropertiesDecorator​(ResourceProperties aProperties,
                                                    org.refcodes.controlflow.ThreadMode aThreadMode)
                                             throws java.io.IOException,
                                                    java.text.ParseException,
                                                    java.lang.IllegalStateException
        Constructs the ScheduledResourcePropertiesDecorator wrapping the given ResourceProperties with default settings being a poll loop time of 10 seconds (as of PollLoopTime.NORM and orphan removal (as of AbstractResourcePropertiesDecorator.reload(ReloadMode) being called with true). Immediately starts polling after construction of this instance for new properties.
        Parameters:
        aProperties - The properties from which the properties are to be reloaded periodically.
        aThreadMode - The ThreadMode mode of operation regarding the Thread doing the scheduling job.
        Throws:
        java.io.IOException - thrown in case accessing the resource encountered an I/O problem.
        java.lang.IllegalStateException - in case the attached resource does not support reloading.
        java.text.ParseException - Signals that an error has been reached unexpectedly while parsing the data to be loaded.
      • ScheduledResourcePropertiesDecorator

        public ScheduledResourcePropertiesDecorator​(ResourceProperties aProperties,
                                                    int aScheduleTimeInMillis,
                                                    org.refcodes.controlflow.ThreadMode aThreadMode)
                                             throws java.io.IOException,
                                                    java.text.ParseException,
                                                    java.lang.IllegalStateException
        Constructs the ScheduledResourcePropertiesDecorator wrapping the given ResourceProperties with setting the given poll loop time and orphan removal (as of AbstractResourcePropertiesDecorator.reload(ReloadMode) being called with true). Immediately starts polling after construction of this instance for new properties.
        Parameters:
        aProperties - The properties from which the properties are to be reloaded periodically.
        aScheduleTimeInMillis - The time in milliseconds between polling for new properties.
        aThreadMode - The ThreadMode mode of operation regarding the Thread doing the scheduling job.
        Throws:
        java.io.IOException - thrown in case accessing the resource encountered an I/O problem.
        java.lang.IllegalStateException - in case the attached resource does not support reloading.
        java.text.ParseException - Signals that an error has been reached unexpectedly while parsing the data to be loaded.
      • ScheduledResourcePropertiesDecorator

        public ScheduledResourcePropertiesDecorator​(ResourceProperties aProperties,
                                                    ReloadMode aReloadMode,
                                                    org.refcodes.controlflow.ThreadMode aThreadMode)
                                             throws java.io.IOException,
                                                    java.text.ParseException,
                                                    java.lang.IllegalStateException
        Constructs the ScheduledResourcePropertiesDecorator wrapping the given ResourceProperties with setting the the default poll loop time of 10 seconds (as of PollLoopTime.NORM and the given orphan removal strategy (as of AbstractResourcePropertiesDecorator.reload(ReloadMode) being called with your argument). Immediately starts polling after construction of this instance for new properties.
        Parameters:
        aProperties - The properties from which the properties are to be reloaded periodically.
        aReloadMode - when set to ReloadMode.ORPHAN_REMOVAL, then properties existing in the attached resource but not(!) in the Properties itself are(!) removed. Else properties not existing in the attached resource are kept.
        aThreadMode - The ThreadMode mode of operation regarding the Thread doing the scheduling job.
        Throws:
        java.io.IOException - thrown in case accessing the resource encountered an I/O problem.
        java.lang.IllegalStateException - in case the attached resource does not support reloading.
        java.text.ParseException - Signals that an error has been reached unexpectedly while parsing the data to be loaded.
      • ScheduledResourcePropertiesDecorator

        public ScheduledResourcePropertiesDecorator​(ResourceProperties aProperties,
                                                    int aScheduleTimeInMillis,
                                                    ReloadMode aReloadMode,
                                                    org.refcodes.controlflow.ThreadMode aThreadMode)
                                             throws java.io.IOException,
                                                    java.text.ParseException,
                                                    java.lang.IllegalStateException
        Constructs the ScheduledResourcePropertiesDecorator wrapping the given ResourceProperties with setting the given poll loop time and the given orphan removal strategy (as of AbstractResourcePropertiesDecorator.reload(ReloadMode) being called with your argument). Immediately starts polling after construction of this instance for new properties.
        Parameters:
        aProperties - The properties from which the properties are to be reloaded periodically.
        aScheduleTimeInMillis - The time in milliseconds between polling for new properties.
        aReloadMode - when set to ReloadMode.ORPHAN_REMOVAL, then properties existing in the attached resource but not(!) in the Properties itself are(!) removed. Else properties not existing in the attached resource are kept.
        aThreadMode - The ThreadMode mode of operation regarding the Thread doing the scheduling job.
        Throws:
        java.io.IOException - thrown in case accessing the resource encountered an I/O problem.
        java.lang.IllegalStateException - in case the attached resource does not support reloading.
        java.text.ParseException - Signals that an error has been reached unexpectedly while parsing the data to be loaded.
    • Method Detail

      • start

        public void start​()
                   throws org.refcodes.component.StartException
        Specified by:
        start in interface org.refcodes.component.Startable
        Throws:
        org.refcodes.component.StartException
      • stop

        public void stop​()
                  throws org.refcodes.component.StopException
        Specified by:
        stop in interface org.refcodes.component.Stoppable
        Throws:
        org.refcodes.component.StopException
      • dispose

        public void dispose​()
        Specified by:
        dispose in interface org.refcodes.mixin.Disposable