Package tigase.component
Class ScheduledTask
java.lang.Object
tigase.util.common.TimerTask
tigase.component.ScheduledTask
- All Implemented Interfaces:
Runnable
,ConfigurationChangedAware
,Initializable
,UnregisterAware
- Direct Known Subclasses:
UpdatesChecker
public abstract class ScheduledTask
extends TimerTask
implements ConfigurationChangedAware, Initializable, UnregisterAware
Abstract class extending TimerTask which allows easy configuration and usage of TimerTask as a bean
Created by andrzej on 09.08.2016.
Created by andrzej on 09.08.2016.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionScheduledTask
(Duration delay, Duration period) Default constructor allows providing default values -
Method Summary
Modifier and TypeMethodDescriptionvoid
beanConfigurationChanged
(Collection<String> changedFields) Method called when configuration was applied to bean.void
Method called before bean unregister.void
Method will be called, when bean will be created, configured and ready to use.Methods inherited from class tigase.util.common.TimerTask
cancel, cancel, isCancelled, isScheduled, reset, setScheduledFuture
-
Field Details
-
component
-
-
Constructor Details
-
ScheduledTask
Default constructor allows providing default values- Parameters:
delay
- default value of delay Durationperiod
- default value of period Duration
-
-
Method Details
-
beanConfigurationChanged
Description copied from interface:ConfigurationChangedAware
Method called when configuration was applied to bean.- Specified by:
beanConfigurationChanged
in interfaceConfigurationChangedAware
- Parameters:
changedFields
- collection of field names which were changed
-
initialize
public void initialize()Description copied from interface:Initializable
Method will be called, when bean will be created, configured and ready to use.- Specified by:
initialize
in interfaceInitializable
-
beforeUnregister
public void beforeUnregister()Description copied from interface:UnregisterAware
Method called before bean unregister.- Specified by:
beforeUnregister
in interfaceUnregisterAware
-