亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? jobinitializationpluginmultiple.java

?? Quartz 是個開源的作業調度框架
?? JAVA
字號:
/*  * Copyright 2004-2005 OpenSymphony  *  * Licensed 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. *  *//* * Previously Copyright (c) 2001-2004 James House */package org.quartz.plugins.xml;import java.io.File;import java.io.FileNotFoundException;import java.io.IOException;import java.net.URL;import java.util.Date;import java.util.Iterator;import java.util.StringTokenizer;import java.util.Vector;import org.apache.commons.logging.Log;import org.apache.commons.logging.LogFactory;import org.quartz.JobDetail;import org.quartz.Scheduler;import org.quartz.SchedulerConfigException;import org.quartz.SchedulerException;import org.quartz.SimpleTrigger;import org.quartz.jobs.FileScanJob;import org.quartz.jobs.FileScanListener;import org.quartz.spi.SchedulerPlugin;import org.quartz.xml.JobSchedulingDataProcessor;/*** This plugin loads XML files to add jobs and schedule them with triggers * as the scheduler is initialized, and can optionally periodically scan the * file for changes. *  * @author Brooke Hedrick */public class JobInitializationPluginMultiple implements SchedulerPlugin, FileScanListener {    /*     * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~     *      * Data members.     *      * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~     */    private String name;    private Scheduler scheduler;    private boolean overWriteExistingJobs = true;    private boolean failOnFileNotFound = true;        private String fileName = JobSchedulingDataProcessor.QUARTZ_XML_FILE_NAME;    private Vector files = new Vector();        private boolean useContextClassLoader = true;        private boolean validating = true;        private boolean validatingSchema = true;    private long scanInterval = 0;         boolean initializing = true;        boolean started = false;        /*     * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~     *      * Constructors.     *      * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~     */    public JobInitializationPluginMultiple() {    }    /*     * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~     *      * Interface.     *      * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~     */    /**     * Whether or not jobs defined in the XML file should be overwrite existing     * jobs with the same name.     *      * @return     */    public boolean isOverWriteExistingJobs() {        return overWriteExistingJobs;    }        /**     * Whether or not jobs defined in the XML file should be overwrite existing     * jobs with the same name.     *      * @param overWriteExistingJobs     */    public void setOverWriteExistingJobs(boolean overWriteExistingJobs) {        this.overWriteExistingJobs = overWriteExistingJobs;    }    /**     * The file name (and path) to the XML file that should be read.     *      * @return     */    public String getFileName() {        return fileName;    }    /**     * The file name (and path) to the XML file that should be read.     *      * @param fileName     */    public void setFileName(String fileName) {        this.fileName = fileName;    }    /**     * The interval (in seconds) at which to scan for changes to the file.       * If the file has been changed, it is re-loaded and parsed.   The default      * value for the interval is 0, which disables scanning.     *      * @return Returns the scanInterval.     */    public long getScanInterval() {        return scanInterval / 1000;    }    /**     * The interval (in seconds) at which to scan for changes to the file.       * If the file has been changed, it is re-loaded and parsed.   The default      * value for the interval is 0, which disables scanning.     *      * @param scanInterval The scanInterval to set.     */    public void setScanInterval(long scanInterval) {        this.scanInterval = scanInterval * 1000;    }        /**     * Whether or not initialization of the plugin should fail (throw an     * exception) if the file cannot be found. Default is <code>true</code>.     *      * @return     */    public boolean isFailOnFileNotFound() {        return failOnFileNotFound;    }    /**     * Whether or not initialization of the plugin should fail (throw an     * exception) if the file cannot be found. Default is <code>true</code>.     *      * @param overWriteExistingJobs     */    public void setFailOnFileNotFound(boolean failOnFileNotFound) {        this.failOnFileNotFound = failOnFileNotFound;    }        /**     * Whether or not the context class loader should be used. Default is <code>true</code>.     *      * @return     */    public boolean isUseContextClassLoader() {        return useContextClassLoader;    }    /**     * Whether or not context class loader should be used. Default is <code>true</code>.     *      * @param useContextClassLoader     */    public void setUseContextClassLoader(boolean useContextClassLoader) {        this.useContextClassLoader = useContextClassLoader;    }        /**     * Whether or not the XML should be validated. Default is <code>true</code>.     *      * @return     */    public boolean isValidating() {        return validating;    }    /**     * Whether or not the XML should be validated. Default is <code>true</code>.     *      * @param validating     */    public void setValidating(boolean validating) {        this.validating = validating;    }        /**     * Whether or not the XML schema should be validated. Default is <code>true</code>.     *      * @return     */    public boolean isValidatingSchema() {        return validatingSchema;    }    /**     * Whether or not the XML schema should be validated. Default is <code>true</code>.     *      * @param validatingSchema     */    public void setValidatingSchema(boolean validatingSchema) {        this.validatingSchema = validatingSchema;    }    protected static Log getLog() {        return LogFactory.getLog(JobInitializationPluginMultiple.class);    }    /*     * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~     *      * SchedulerPlugin Interface.     *      * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~     */    /**     * <p>     * Called during creation of the <code>Scheduler</code> in order to give     * the <code>SchedulerPlugin</code> a chance to initialize.     * </p>     *      * @throws SchedulerConfigException     *           if there is an error initializing.     */    public void initialize(String name, final Scheduler scheduler)            throws SchedulerException {                initializing = true;        try {            this.name = name;            this.scheduler = scheduler;                getLog().info("Registering Quartz Job Initialization Plug-in.");                        updateJobFileList();        }        finally {            initializing = false;        }    }        private void updateJobFileList() {        StringTokenizer stok = new StringTokenizer(fileName, ",");    	while(stok.hasMoreTokens()) {    		JobFile jobFile = new JobFile(stok.nextToken());    		files.add(jobFile);    	}    }        public void start() {    	//TODO:bth 6.3.2005 The way this works, I believe we only need one job scanning for changes per directory        if(scanInterval > 0) {            try{            	Iterator iterator = files.iterator();            	while (iterator.hasNext()) {            		JobFile jobFile = (JobFile)iterator.next();            		            		SimpleTrigger trig = new SimpleTrigger(            				"JobInitializationPluginMultiple_"+name,             				"JobInitializationPluginMultiple",             				new Date(), null,             				SimpleTrigger.REPEAT_INDEFINITELY, scanInterval);            		trig.setVolatility(true);            		JobDetail job = new JobDetail(            				"JobInitializationPluginMultiple_"+name,             				"JobInitializationPluginMultiple",            				FileScanJob.class);            		job.setVolatility(true);            		job.getJobDataMap().put(FileScanJob.FILE_NAME, jobFile.getFilePath());            		job.getJobDataMap().put(FileScanJob.FILE_SCAN_LISTENER_NAME, "JobInitializationPluginMultiple_"+name);            		            		scheduler.getContext().put("JobInitializationPluginMultiple_"+name, this);            		scheduler.scheduleJob(job, trig);            	}            }            catch(SchedulerException se) {                getLog().error("Error starting background-task for watching jobs file.", se);            }        }                try {            processFiles();        }        finally {            started = true;        }    }    /**     * <p>     * Called in order to inform the <code>SchedulerPlugin</code> that it     * should free up all of it's resources because the scheduler is shutting     * down.     * </p>     */    public void shutdown() {        // nothing to do    }        public void processFiles() {        JobSchedulingDataProcessor processor =             new JobSchedulingDataProcessor(isUseContextClassLoader(), isValidating(), isValidatingSchema());        Iterator iterator = files.iterator();        while (iterator.hasNext()) {        	JobFile jobFile = (JobFile)iterator.next();        	try {                if (jobFile.getFileFound()) {                	processor.processFileAndScheduleJobs(jobFile.getFileName(), scheduler, isOverWriteExistingJobs());               	}       		} catch (Exception e) {       			getLog().error("Error scheduling jobs: " + e.getMessage(), e);       		}        }    }    /**      * @see org.quartz.jobs.FileScanListener#fileUpdated(java.lang.String)     */    public void fileUpdated(String fileName) {        if(started)            processFiles();    }        class JobFile {        private String fileName = null;                private String filePath = null;                private boolean fileFound = false;        protected JobFile(String fileName) {        	this.fileName = fileName;        }                protected String getFileName() {        	return fileName;        }                protected boolean getFileFound() throws SchedulerException {            if(this.filePath == null) {                findFile();                     }            return fileFound;        }        protected String getFilePath() throws SchedulerException {            if(this.filePath == null) {                findFile();                     }                        return this.filePath;        }                /**         *          */        private void findFile() throws SchedulerException {            java.io.InputStream f = null;                        File file = new File(fileName); // files in filesystem            if (file == null || !file.exists()) {                // files in classpath                URL url = Thread.currentThread()                    .getContextClassLoader()                    .getResource(fileName);                if(url != null) {                    file = new File(url.getPath());                 }            }                    try {                              f = new java.io.FileInputStream(file);            }catch (FileNotFoundException e) {                // ignore            }                        if (f == null && isFailOnFileNotFound()) {                throw new SchedulerException("File named '" + fileName                        + "' does not exist.");            } else if (f == null) {                getLog().warn("File named '" + fileName + "' does not exist.");            } else {                fileFound = true;                try {                    this.filePath = file.getPath();                    f.close();                } catch (IOException ioe) {                    getLog()                            .warn("Error closing file named '" + fileName, ioe);                }            }        }    }}// EOF

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
精品国产乱码久久| 国产老女人精品毛片久久| 欧美精品一区二区三区视频| 色94色欧美sute亚洲13| 日韩一区欧美二区| xnxx国产精品| 欧美一区二区三区免费观看视频| 风间由美一区二区av101| 久久91精品久久久久久秒播| 久久久美女艺术照精彩视频福利播放| 欧美疯狂性受xxxxx喷水图片| 色偷偷成人一区二区三区91| 成人深夜福利app| 国产乱码一区二区三区| 麻豆高清免费国产一区| 亚洲电影在线播放| 亚洲精选免费视频| 久久毛片高清国产| 久久精品视频一区二区三区| 日韩精品一区二区在线观看| 欧美日韩免费在线视频| www.在线欧美| 99视频有精品| 色噜噜狠狠色综合欧洲selulu| 99久久婷婷国产综合精品| 成人美女视频在线看| 日韩精彩视频在线观看| 亚洲欧美激情小说另类| 亚洲色图制服诱惑 | 久久综合色之久久综合| 日本乱码高清不卡字幕| 欧美日韩一区二区三区高清| 欧美色手机在线观看| 91精品欧美一区二区三区综合在 | 波多野结衣欧美| 成人午夜电影小说| 国产亚洲成年网址在线观看| 国产精品日产欧美久久久久| 最新高清无码专区| 国产69精品一区二区亚洲孕妇| 日韩午夜激情av| 日本欧洲一区二区| 久久一夜天堂av一区二区三区| 久久精品国产免费| 中文字幕一区在线| 91精品国产91综合久久蜜臀| 亚洲欧美激情插| 欧美三级电影在线看| 免费在线观看一区二区三区| 欧美激情一二三区| 中文字幕一区av| 波波电影院一区二区三区| 国产精品久久久久9999吃药| 91免费看片在线观看| 亚洲va韩国va欧美va| 久久夜色精品国产欧美乱极品| 理论电影国产精品| 亚洲美女视频一区| 久久综合九色欧美综合狠狠| 99国产麻豆精品| 日韩高清一区在线| 日韩综合在线视频| 在线中文字幕一区| 99精品视频在线免费观看| 亚洲国产wwwccc36天堂| 亚洲在线观看免费视频| 亚洲精品久久7777| 日日骚欧美日韩| 三级久久三级久久久| 丝袜国产日韩另类美女| 久久国产精品色婷婷| 国产一区福利在线| 国产成人精品午夜视频免费| 国产一区二区三区电影在线观看| 久久精品国产亚洲高清剧情介绍| 首页综合国产亚洲丝袜| 激情成人综合网| av资源站一区| 日韩一区二区精品在线观看| 久久影院午夜论| 中文字幕一区视频| 肉色丝袜一区二区| 国产精品99精品久久免费| 99riav久久精品riav| 在线播放亚洲一区| 欧美极品美女视频| 三级欧美在线一区| 91麻豆免费视频| 久久久国际精品| 五月开心婷婷久久| av不卡免费电影| 国产日韩欧美制服另类| 国产一区福利在线| 日本乱人伦一区| 国产精品视频九色porn| 奇米888四色在线精品| 在线视频国内一区二区| 亚洲日本在线天堂| 99在线热播精品免费| 国产亚洲一本大道中文在线| 亚洲va欧美va人人爽| 在线视频国内自拍亚洲视频| 亚洲另类在线视频| 欧美日韩mp4| 婷婷久久综合九色国产成人| 欧美在线一区二区三区| 亚洲欧美日韩在线| 欧美性大战久久久久久久蜜臀| 中文字幕一区二区三区不卡| 色综合中文字幕| 亚洲日韩欧美一区二区在线| 在线亚洲欧美专区二区| 偷拍日韩校园综合在线| 日韩片之四级片| 国产黄色成人av| 亚洲免费电影在线| 制服.丝袜.亚洲.中文.综合| 久久精品久久久精品美女| 国产免费观看久久| 欧美精品一级二级三级| 精品一区二区成人精品| 中文字幕一区二区日韩精品绯色| 色婷婷亚洲综合| 精一区二区三区| 一区二区三区在线观看欧美| 欧美一区日本一区韩国一区| 成人av集中营| 另类综合日韩欧美亚洲| 亚洲欧美日韩一区二区| 精品噜噜噜噜久久久久久久久试看| 91色porny蝌蚪| 国产高清在线观看免费不卡| 亚洲成人av免费| 亚洲精品成a人| 国产精品护士白丝一区av| 日韩欧美国产午夜精品| 欧美亚洲国产一区二区三区va| 国产91露脸合集magnet| 久久99精品国产91久久来源| 日本午夜一本久久久综合| 亚洲一区二区三区三| 亚洲一二三级电影| 亚洲亚洲人成综合网络| 亚洲国产日韩a在线播放性色| 蜜桃av噜噜一区| 日韩电影在线一区二区| 亚洲一线二线三线视频| 一区av在线播放| 日韩一区精品字幕| 久久精品国产成人一区二区三区 | 日韩午夜av电影| 日韩欧美黄色影院| 国产精品免费视频一区| 亚洲综合在线电影| 天天综合色天天| 国产一区二三区| 91久久精品日日躁夜夜躁欧美| 欧美日韩高清在线| 精品国产一区二区三区久久久蜜月| 日韩免费视频一区二区| 欧美国产日产图区| 三级精品在线观看| 99国产精品久久久久久久久久久| 欧美日韩免费在线视频| 国产亚洲精品bt天堂精选| 国产精品三级电影| 日韩**一区毛片| 色综合色狠狠综合色| 国产日韩欧美高清| 免费成人美女在线观看| 色综合天天综合网天天看片| 精品国精品自拍自在线| 亚洲一区二区三区中文字幕在线| 国模少妇一区二区三区| 337p亚洲精品色噜噜狠狠| 中文字幕一区二区三区在线播放| 99在线精品免费| 精品福利一区二区三区免费视频| 亚洲精品久久嫩草网站秘色| 国产99久久久国产精品潘金网站| 日韩一区二区三区三四区视频在线观看| 中文字幕一区二区三区四区不卡| 国产成+人+日韩+欧美+亚洲| 久久精品视频免费观看| 国产高清久久久| 国产精品午夜免费| av高清久久久| 亚洲三级在线播放| 精品视频999| 国产中文字幕精品| 国产精品色一区二区三区| aaa亚洲精品| 亚洲v中文字幕| 久久久久高清精品| 91视频在线看| 老鸭窝一区二区久久精品| 国产日本一区二区| 在线亚洲高清视频| 激情久久五月天| 亚洲色图20p|