Package tigase.component
Class ScheduledTask
- java.lang.Object
-
- tigase.util.common.TimerTask
-
- tigase.component.ScheduledTask
-
- All Implemented Interfaces:
java.lang.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.
-
-
Field Summary
Fields Modifier and Type Field Description protected AbstractMessageReceiver
component
-
Constructor Summary
Constructors Constructor Description ScheduledTask(java.time.Duration delay, java.time.Duration period)
Default constructor allows providing default values
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
beanConfigurationChanged(java.util.Collection<java.lang.String> changedFields)
Method called when configuration was applied to bean.void
beforeUnregister()
Method called before bean unregister.void
initialize()
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 Detail
-
component
@Inject(bean="service") protected AbstractMessageReceiver component
-
-
Method Detail
-
beanConfigurationChanged
public void beanConfigurationChanged(java.util.Collection<java.lang.String> changedFields)
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
-
-