Package org.quartz

Examples of org.quartz.Job


     * is about to be executed (an associated <code>{@link org.quartz.Trigger}</code> has
     * occured).</p>
     */
    public void jobToBeExecuted( JobExecutionContext context )
    {
        Job job = context.getJobInstance();

        // Only attempt to set the ServiceBroker when we are dealing
        // with subclasses AbstractJob.
        if ( job instanceof AbstractJob )
        {
View Full Code Here


     * has been executed, and be for the associated <code>Trigger</code>'s
     * <code>triggered(xx)</code> method has been called.</p>
     */
    public void jobWasExecuted( JobExecutionContext context, JobExecutionException jobException )
    {
        Job job = context.getJobInstance();

        // Only attempt to null the ServiceBroker when we are dealing
        // with subclasses AbstractJob.
        if ( job instanceof AbstractJob )
        {
View Full Code Here

    }

    public void registerJob(final Task task, final String jobClassName, final String cronExpression) throws Exception {

        Class jobClass = Class.forName(jobClassName);
        Job jobInstance = (Job) getBeanFactory().createBean(jobClass, AbstractBeanDefinition.AUTOWIRE_BY_TYPE, false);
        if (jobInstance instanceof AbstractTaskJob) {
            ((AbstractTaskJob) jobInstance).setTaskId(task.getId());
        }
        if (jobInstance instanceof SyncJob && task instanceof SyncTask) {
            String jobActionsClassName = ((SyncTask) task).getJobActionsClassName();
View Full Code Here

        registerJob(getJobName(task), jobInstance, cronExpression);
    }

    public void registerJob(final Report report) throws Exception {

        Job jobInstance = (Job) getBeanFactory().createBean(ReportJob.class, AbstractBeanDefinition.AUTOWIRE_BY_TYPE,
                false);
        ((ReportJob) jobInstance).setReportId(report.getId());

        registerJob(getJobName(report), jobInstance, report.getCronExpression());
    }
View Full Code Here

     *
     * @see org.quartz.JobListener#jobToBeExecuted(org.quartz.JobExecutionContext)
     */
    public void jobToBeExecuted(JobExecutionContext context)
    {
        Job job = context.getJobInstance();

        // inject a logger instance
        if(job instanceof LogEnabled)
        {
            ((LogEnabled) job).enableLogging(getLogger());
View Full Code Here

    public void registerJob(final Task task, final String jobClassName, final String cronExpression)
            throws ClassNotFoundException, SchedulerException, ParseException {

        Class<?> jobClass = Class.forName(jobClassName);
        Job jobInstance = (Job) ApplicationContextProvider.getBeanFactory().
                createBean(jobClass, AbstractBeanDefinition.AUTOWIRE_BY_TYPE, false);
        if (jobInstance instanceof TaskJob) {
            ((TaskJob) jobInstance).setTaskId(task.getId());
        }
        if (jobInstance instanceof SyncJob && task instanceof SyncTask) {
View Full Code Here

        registerJob(getJobName(task), jobInstance, cronExpression);
    }

    public void registerJob(final Report report) throws SchedulerException, ParseException {
        Job jobInstance = (Job) ApplicationContextProvider.getBeanFactory().
                createBean(ReportJob.class, AbstractBeanDefinition.AUTOWIRE_BY_TYPE, false);
        ((ReportJob) jobInstance).setReportId(report.getId());

        registerJob(getJobName(report), jobInstance, report.getCronExpression());
    }
View Full Code Here

    public void registerJob(final Task task, final String jobClassName, final String cronExpression)
            throws ClassNotFoundException, SchedulerException, ParseException {

        Class<?> jobClass = Class.forName(jobClassName);
        Job jobInstance = (Job) ApplicationContextProvider.getBeanFactory().
                createBean(jobClass, AbstractBeanDefinition.AUTOWIRE_BY_TYPE, false);
        if (jobInstance instanceof TaskJob) {
            ((TaskJob) jobInstance).setTaskId(task.getId());
        }
        if (jobInstance instanceof SyncJob && task instanceof SyncTask) {
View Full Code Here

        registerJob(getJobName(task), jobInstance, cronExpression);
    }

    public void registerJob(final Report report) throws SchedulerException, ParseException {
        Job jobInstance = (Job) ApplicationContextProvider.getBeanFactory().
                createBean(ReportJob.class, AbstractBeanDefinition.AUTOWIRE_BY_TYPE, false);
        ((ReportJob) jobInstance).setReportId(report.getId());

        registerJob(getJobName(report), jobInstance, report.getCronExpression());
    }
View Full Code Here

    }

    public void registerJob(final Task task, final String jobClassName, final String cronExpression) throws Exception {

        Class jobClass = Class.forName(jobClassName);
        Job jobInstance = (Job) getBeanFactory().createBean(jobClass, AbstractBeanDefinition.AUTOWIRE_BY_TYPE, false);
        if (jobInstance instanceof AbstractTaskJob) {
            ((AbstractTaskJob) jobInstance).setTaskId(task.getId());
        }
        if (jobInstance instanceof SyncJob && task instanceof SyncTask) {
            String jobActionsClassName = ((SyncTask) task).getJobActionsClassName();
View Full Code Here

TOP

Related Classes of org.quartz.Job

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.