
org.apache.turbine.services.schedule.TurbineNonPersistentSchedulerService Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of turbine Show documentation
Show all versions of turbine Show documentation
Turbine is a servlet based framework that allows experienced Java
developers to quickly build secure web applications. Parts of Turbine
can also be used independently of the web portion of Turbine as
well. In other words, we strive to make portions of Turbine easily
available for use in other applications.
package org.apache.turbine.services.schedule;
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
import java.util.ArrayList;
import java.util.List;
import org.apache.commons.configuration2.Configuration;
import org.apache.commons.lang3.StringUtils;
import org.apache.turbine.util.TurbineException;
/**
* Service for a cron like scheduler that uses the
* TurbineResources.properties file instead of the database.
* The methods that operate on jobs ( get,add,update,remove )
* only operate on the queue in memory and changes are not reflected
* to the properties file which was used to initialize the jobs.
* An example is given below. The job names are the class names that
* extend ScheduledJob.
*
*
*
* services.SchedulerService.scheduler.jobs=scheduledJobName,scheduledJobName2
*
* services.SchedulerService.scheduler.job.scheduledJobName.ID=1
* services.SchedulerService.scheduler.job.scheduledJobName.SECOND=-1
* services.SchedulerService.scheduler.job.scheduledJobName.MINUTE=-1
* services.SchedulerService.scheduler.job.scheduledJobName.HOUR=7
* services.SchedulerService.scheduler.job.scheduledJobName.WEEKDAY=-1
* services.SchedulerService.scheduler.job.scheduledJobName.DAY_OF_MONTH=-1
*
* services.SchedulerService.scheduler.job.scheduledJobName2.ID=1
* services.SchedulerService.scheduler.job.scheduledJobName2.SECOND=-1
* services.SchedulerService.scheduler.job.scheduledJobName2.MINUTE=-1
* services.SchedulerService.scheduler.job.scheduledJobName2.HOUR=7
* services.SchedulerService.scheduler.job.scheduledJobName2.WEEKDAY=-1
* services.SchedulerService.scheduler.job.scheduledJobName2.DAY_OF_MONTH=-1
*
*
*
* Based on TamboraSchedulerService written by John Thorhauer.
*
* @author Jeff Brekke
* @author John Thorhauer
* @author Quinton McCombs
* @version $Id: TurbineNonPersistentSchedulerService.java 534527 2007-05-02 16:10:59Z tv $
*
* @deprecated Use QuartzSchedulerService instead
*/
@Deprecated
public class TurbineNonPersistentSchedulerService extends AbstractSchedulerService
{
/**
* @see org.apache.turbine.services.schedule.AbstractSchedulerService#loadJobs()
*/
@Override
protected List extends JobEntry> loadJobs() throws TurbineException
{
Configuration conf = getConfiguration();
List
© 2015 - 2025 Weber Informatics LLC | Privacy Policy