|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.sape.carbon.services.scheduler.DefaultSchedulerServiceImpl
Default implementation for the SchedulerService. This implementation uses java.util.Timer to schedule tasks. When this service is stopped or suspended, all tasks are canceled. When this service is started or resumed, all configured tasks are scheduled.
Copyright 2002 Sapient
Field Summary | |
private Timer |
internalTimer
Holds the timer object that will execute the tasks. |
private org.apache.commons.logging.Log |
log
Provides a handle to Apache-commons logger |
private Collection |
scheduledTasks
Holds the collection of scheduled tasks for this service. |
private Component |
thisComponent
|
Constructor Summary | |
DefaultSchedulerServiceImpl()
|
Method Summary | |
void |
configure(ComponentConfiguration configuration)
Configure the component. |
void |
initialize(Component thisComponent)
Initialize the component. |
void |
resume()
Resume the component. |
private void |
scheduleAllTasks()
Iterates over tasks and schedules them. |
void |
start()
Start the component. |
void |
stop()
Stop the component. |
void |
suspend()
Suspend the component. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private org.apache.commons.logging.Log log
private Timer internalTimer
private Collection scheduledTasks
private Component thisComponent
Constructor Detail |
public DefaultSchedulerServiceImpl()
Method Detail |
public void configure(ComponentConfiguration configuration)
Configurable
configure
in interface Configurable
configuration
- the configuration for this componentConfigurable.configure(ComponentConfiguration)
public void start()
Startable
start
in interface Startable
Startable.start()
public void stop()
Startable
stop
in interface Startable
Startable.stop()
public void resume()
Suspendable
resume
in interface Suspendable
Suspendable.resume()
public void suspend()
Suspendable
suspend
in interface Suspendable
Suspendable.suspend()
public void initialize(Component thisComponent) throws Exception
Initializable
initialize
in interface Initializable
thisComponent
- the reference to the component that this object
is a part of. Store this referece within your Functional Implementation
for future use.
Exception
- when there is a failure to initialize the componentprivate void scheduleAllTasks()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |