|
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
org.quartz.plugins.management Class ShutdownHookPlugin
java.lang.Objectorg.quartz.plugins.management.ShutdownHookPlugin
- All Implemented Interfaces:
- org.quartz.spi.SchedulerPlugin
public class ShutdownHookPlugin
- extends Object
- implements org.quartz.spi.SchedulerPlugin
This plugin catches the event of the JVM terminating (such as upon a CRTL-C) and tells the scheuler to shutdown.
- Author:
- James House
- See Also:
Scheduler.shutdown(boolean)
| Constructor Summary | |
|---|---|
ShutdownHookPlugin()
|
|
| Method Summary | |
|---|---|
protected org.slf4j.Logger |
getLog()
|
void |
initialize(String name,
Scheduler scheduler)
Called during creation of the Scheduler in order to give
the SchedulerPlugin a chance to initialize. |
boolean |
isCleanShutdown()
Determine whether or not the plug-in is configured to cause a clean shutdown of the scheduler. |
void |
setCleanShutdown(boolean b)
Set whether or not the plug-in is configured to cause a clean shutdown of the scheduler. |
void |
shutdown()
Called in order to inform the SchedulerPlugin that it
should free up all of it's resources because the scheduler is shutting
down. |
void |
start()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
ShutdownHookPlugin
public ShutdownHookPlugin()
| Method Detail |
|---|
isCleanShutdown
public boolean isCleanShutdown()
- Determine whether or not the plug-in is configured to cause a clean
shutdown of the scheduler.
The default value is
true. - See Also:
Scheduler.shutdown(boolean)
setCleanShutdown
public void setCleanShutdown(boolean b)
- Set whether or not the plug-in is configured to cause a clean shutdown
of the scheduler.
The default value is
true. - See Also:
Scheduler.shutdown(boolean)
getLog
protected org.slf4j.Logger getLog()
initialize
public void initialize(String name, Scheduler scheduler) throws SchedulerException
Called during creation of the
Schedulerin order to give theSchedulerPlugina chance to initialize.- Specified by:
initializein interfaceorg.quartz.spi.SchedulerPlugin
- Throws:
SchedulerConfigException- if there is an error initializing.SchedulerException
start
public void start()
- Specified by:
startin interfaceorg.quartz.spi.SchedulerPlugin
shutdown
public void shutdown()
Called in order to inform the
SchedulerPluginthat it should free up all of it's resources because the scheduler is shutting down.- Specified by:
shutdownin interfaceorg.quartz.spi.SchedulerPlugin
|
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Copyright 2001-2011, Terracotta, Inc.
org.quartz.plugins.management.ShutdownHookPlugin