public class SchedulerServiceImpl extends DefaultComponent implements SchedulerService
Modifier and Type | Field and Description |
---|---|
protected RuntimeContext |
context |
protected ScheduleExtensionRegistry |
registry |
protected org.quartz.Scheduler |
scheduler |
lastModified
Constructor and Description |
---|
SchedulerServiceImpl() |
Modifier and Type | Method and Description |
---|---|
void |
activate(ComponentContext context)
Activates the component.
|
void |
deactivate(ComponentContext context)
Deactivates the component.
|
RuntimeContext |
getContext() |
boolean |
hasApplicationStarted()
Checks if the framework has fully started.
|
void |
registerExtension(Extension extension)
Registers the given extension.
|
void |
registerSchedule(Schedule schedule)
Registers a schedule.
|
void |
registerSchedule(Schedule schedule,
Map<String,Serializable> parameters)
Registers a schedule.
|
protected void |
schedule(Schedule schedule,
Map<String,Serializable> parameters) |
protected void |
setupScheduler() |
protected void |
shutdownScheduler() |
void |
start(ComponentContext context)
Start the component.
|
void |
stop(ComponentContext context)
Stop the component.
|
void |
unregisterExtension(Extension extension)
Unregisters the given extension.
|
boolean |
unregisterSchedule(Schedule schedule)
UnRegisters a schedule.
|
boolean |
unregisterSchedule(String id)
UnRegisters a schedule.
|
protected boolean |
unschedule(String jobId) |
getAdapter, getLastModified, registerContribution, setLastModified, setModifiedNow, unregisterContribution
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
applicationStarted, getApplicationStartedOrder
protected RuntimeContext context
protected org.quartz.Scheduler scheduler
protected final ScheduleExtensionRegistry registry
public SchedulerServiceImpl()
public void activate(ComponentContext context)
Component
This method is called by the runtime when a component is activated.
activate
in interface Component
activate
in class DefaultComponent
context
- the runtime contextprotected void setupScheduler() throws IOException, org.quartz.SchedulerException
IOException
org.quartz.SchedulerException
protected void shutdownScheduler()
public void deactivate(ComponentContext context)
Component
This method is called by the runtime when a component is deactivated.
deactivate
in interface Component
deactivate
in class DefaultComponent
context
- the runtime contextpublic void start(ComponentContext context)
Component
start
in interface Component
start
in class DefaultComponent
public void stop(ComponentContext context)
Component
stop
in interface Component
stop
in class DefaultComponent
public boolean hasApplicationStarted()
SchedulerService
Used to delay job execution until the framework has fully started.
hasApplicationStarted
in interface SchedulerService
true
if the framework has startedpublic void registerExtension(Extension extension)
Extensible
registerExtension
in interface Extensible
registerExtension
in class DefaultComponent
extension
- the extension to registerpublic void unregisterExtension(Extension extension)
Extensible
unregisterExtension
in interface Extensible
unregisterExtension
in class DefaultComponent
extension
- the extension to unregisterpublic RuntimeContext getContext()
public void registerSchedule(Schedule schedule)
SchedulerService
registerSchedule
in interface SchedulerService
schedule
- the schedulepublic void registerSchedule(Schedule schedule, Map<String,Serializable> parameters)
SchedulerService
registerSchedule
in interface SchedulerService
protected void schedule(Schedule schedule, Map<String,Serializable> parameters)
public boolean unregisterSchedule(String id)
SchedulerService
unregisterSchedule
in interface SchedulerService
id
- the schedule idprotected boolean unschedule(String jobId)
public boolean unregisterSchedule(Schedule schedule)
SchedulerService
unregisterSchedule
in interface SchedulerService
schedule
- to be unregisteredCopyright © 2018 Nuxeo. All rights reserved.