@Singleton @Unbound @Configurable public class ScheduledTask extends java.lang.Object implements AlarmListener, EnvironmentListener
| Modifier and Type | Class and Description |
|---|---|
static class |
ScheduledTask.MethodTask |
class |
ScheduledTask.ServletTask |
| Constructor and Description |
|---|
ScheduledTask()
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(java.lang.Runnable task) |
void |
environmentBind(EnvironmentClassLoader loader)
Handles the case where the environment is binding injection targets
|
void |
environmentConfigure(EnvironmentClassLoader loader)
Handles the case where the environment is configuring and
registering beans
|
void |
environmentStart(EnvironmentClassLoader loader)
Handles the case where the environment is starting (after init).
|
void |
environmentStop(EnvironmentClassLoader loader)
Handles the case where the environment is stopping (after init).
|
java.lang.Runnable |
getTask() |
void |
handleAlarm(Alarm alarm)
The runnable.
|
void |
init()
Initialization.
|
void |
setCron(java.lang.String cron)
Sets the cron interval.
|
void |
setDelay(Period delay)
Sets the delay
|
void |
setMethod(MethodExpression method)
Sets the method expression as a task
|
void |
setPeriod(Period period)
Sets the period
|
void |
setTask(java.lang.Runnable task)
Sets the task.
|
void |
setUrl(java.lang.String url)
Sets the url expression as a task
|
java.lang.String |
toString() |
@Configurable public void setDelay(Period delay)
@Configurable public void setPeriod(Period period)
@Configurable public void setCron(java.lang.String cron)
@Configurable public void setMethod(MethodExpression method)
@Configurable public void setUrl(java.lang.String url)
@Configurable public void setTask(java.lang.Runnable task)
public java.lang.Runnable getTask()
@Configurable public void add(java.lang.Runnable task)
@PostConstruct public void init() throws ConfigException
ConfigExceptionpublic void handleAlarm(Alarm alarm)
handleAlarm in interface AlarmListenerpublic void environmentConfigure(EnvironmentClassLoader loader) throws ConfigException
EnvironmentListenerenvironmentConfigure in interface EnvironmentListenerConfigExceptionpublic void environmentBind(EnvironmentClassLoader loader) throws ConfigException
EnvironmentListenerenvironmentBind in interface EnvironmentListenerConfigExceptionpublic void environmentStart(EnvironmentClassLoader loader)
EnvironmentListenerenvironmentStart in interface EnvironmentListenerpublic void environmentStop(EnvironmentClassLoader loader)
EnvironmentListenerenvironmentStop in interface EnvironmentListenerpublic java.lang.String toString()
toString in class java.lang.Object