|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.quartz.plugins.history.LoggingTriggerHistoryPlugin
Logs a history of all trigger firings via the Jakarta Commons-Logging framework.
The logged message is customizable by setting one of the
following message properties to a String that conforms to the syntax of
java.util.MessageFormat.
TriggerFiredMessage - available message data are:
| Element | Data Type | Description |
|---|---|---|
| 0 | String | The Trigger's Name. |
| 1 | String | The Trigger's Group. |
| 2 | Date | The scheduled fire time. |
| 3 | Date | The next scheduled fire time. |
| 4 | Date | The actual fire time. |
| 5 | String | The Job's name. |
| 6 | String | The Job's group. |
| 7 | Integer | The re-fire count from the JobExecutionContext. |
TriggerMisfiredMessage - available message data are:
| Element | Data Type | Description |
|---|---|---|
| 0 | String | The Trigger's Name. |
| 1 | String | The Trigger's Group. |
| 2 | Date | The scheduled fire time. |
| 3 | Date | The next scheduled fire time. |
| 4 | Date | The actual fire time. |
| 5 | String | The Job's name. |
| 6 | String | The Job's group. |
TriggerCompleteMessage - available message data are:
| Element | Data Type | Description |
|---|---|---|
| 0 | String | The Trigger's Name. |
| 1 | String | The Trigger's Group. |
| 2 | Date | The scheduled fire time. |
| 3 | Date | The next scheduled fire time. |
| 4 | Date | The job completion time. |
| 5 | String | The Job's name. |
| 6 | String | The Job's group. |
| 7 | Integer | The re-fire count from the JobExecutionContext. |
| 8 | Integer | The trigger's resulting instruction code. |
| 9 | String | A human-readable translation of the trigger's resulting instruction code. |
| Constructor Summary | |
LoggingTriggerHistoryPlugin()
|
|
| Method Summary | |
protected static org.apache.commons.logging.Log |
getLog()
|
java.lang.String |
getName()
Get the name of the TriggerListener. |
java.lang.String |
getTriggerCompleteMessage()
Get the message that is printed upon the completion of a trigger's firing. |
java.lang.String |
getTriggerFiredMessage()
Get the message that is printed upon a trigger's firing. |
java.lang.String |
getTriggerMisfiredMessage()
Get the message that is printed upon a trigger's mis-firing. |
void |
initialize(java.lang.String name,
Scheduler scheduler)
Called during creation of the Scheduler in order to give
the SchedulerPlugin a chance to initialize. |
void |
setTriggerCompleteMessage(java.lang.String triggerCompleteMessage)
Set the message that is printed upon the completion of a trigger's firing. |
void |
setTriggerFiredMessage(java.lang.String triggerFiredMessage)
Set the message that is printed upon a trigger's firing. |
void |
setTriggerMisfiredMessage(java.lang.String triggerMisfiredMessage)
Set the message that is printed upon a trigger's firing. |
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 |
triggerComplete(Trigger trigger,
JobExecutionContext context,
int triggerInstructionCode)
Called by the when a
has fired, it's associated
has been executed, and it's
triggered(xx) method has been called. |
void |
triggerFired(Trigger trigger,
JobExecutionContext context)
Called by the when a
has fired, and it's associated
is about to be executed. |
void |
triggerMisfired(Trigger trigger)
Called by the when a
has misfired. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public LoggingTriggerHistoryPlugin()
| Method Detail |
protected static org.apache.commons.logging.Log getLog()
public java.lang.String getTriggerCompleteMessage()
public java.lang.String getTriggerFiredMessage()
public java.lang.String getTriggerMisfiredMessage()
public void setTriggerCompleteMessage(java.lang.String triggerCompleteMessage)
triggerCompleteMessage - String in java.text.MessageFormat syntax.public void setTriggerFiredMessage(java.lang.String triggerFiredMessage)
triggerFiredMessage - String in java.text.MessageFormat syntax.public void setTriggerMisfiredMessage(java.lang.String triggerMisfiredMessage)
triggerMisfiredMessage - String in java.text.MessageFormat syntax.
public void initialize(java.lang.String name,
Scheduler scheduler)
throws SchedulerException
Called during creation of the Scheduler in order to give
the SchedulerPlugin a chance to initialize.
initialize in interface SchedulerPluginname - The name by which the plugin is identified.scheduler - The scheduler to which the plugin is registered.
SchedulerConfigException - if there is an error initializing.
SchedulerExceptionpublic 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.
shutdown in interface SchedulerPluginpublic java.lang.String getName()
TriggerListenerGet the name of the TriggerListener.
getName in interface TriggerListener
public void triggerFired(Trigger trigger,
JobExecutionContext context)
TriggerListenerCalled by the when a
Scheduler has fired, and it's associated
Trigger is about to be executed.JobDetail
triggerFired in interface TriggerListenertrigger - The Trigger that has fired.context - The JobExecutionContext that will be passed
to the Job's execute(xx) method.public void triggerMisfired(Trigger trigger)
TriggerListenerCalled by the when a
Scheduler has misfired.Trigger
triggerMisfired in interface TriggerListenertrigger - The Trigger that has misfired.
public void triggerComplete(Trigger trigger,
JobExecutionContext context,
int triggerInstructionCode)
TriggerListenerCalled by the when a
Scheduler has fired, it's associated
Trigger has been executed, and it's
JobDetailtriggered(xx) method has been called.
triggerComplete in interface TriggerListenertrigger - The Trigger that was fired.context - The JobExecutionContext that was passed
to the Job's execute(xx) method.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||