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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? crontask.java

?? jcrontab是一個定時器開源項目包 目前提供存取文件或數(shù)據(jù)庫, 把執(zhí)行結(jié)果寄發(fā) email, 簡單地設(shè)置在 Tomcat, Resin, Jetty 及 JBoss 之上, 更是可以取代 cron
?? JAVA
字號:
/** *  This file is part of the jcrontab package *  Copyright (C) 2001-2003 Israel Olalla * *  This library is free software; you can redistribute it and/or *  modify it under the terms of the GNU Lesser General Public *  License as published by the Free Software Foundation; either *  version 2 of the License, or (at your option) any later version. * *  This library is distributed in the hope that it will be useful, *  but WITHOUT ANY WARRANTY; without even the implied warranty of *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU *  Lesser General Public License for more details. * *  You should have received a copy of the GNU Lesser General Public *  License along with this library; if not, write to the Free *  Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, *  MA 02111-1307, USA * *  For questions, suggestions: * *  iolalla@yahoo.com * */ package org.jcrontab;import java.io.File;import java.io.FileOutputStream;import java.io.OutputStream;import java.io.PrintStream;import java.lang.reflect.Constructor;import java.lang.reflect.Method;import java.util.Arrays; import javax.naming.InitialContext; import javax.ejb.EJBHome; import javax.ejb.EJBObject; import org.jcrontab.log.Log;/**  * Implements a runnable task that can be scheduled and executed by the * Crontab. * If a new kind of task is desired, this class should be extended and the * abstract method runTask should be overwritten. * @author $Author: iolalla $ * @version $Revision: 1.27 $ */public class CronTask    extends Thread {    private Crontab crontab;    private int identifier;    private String[] strExtraInfo;    public String strClassName;    public String strMethodName;    public String[] strParams;    private static Runnable runnable = null;    /**     * Constructor of a task.     * @param strClassName Name of the Class     * @param strParams Parameters for the class or the Method      */    public CronTask(String strClassName, String strMethodName,                     String[] strParams) {        this.strClassName = strClassName;        this.strMethodName = strMethodName;        this.strParams = strParams;    }    /**     * Constructor of a task.     * We always call the constructor with no arguments, because the tasks     * are created dinamically (by Class.forName).     * You should call the method setParams inmediatly after creating a new task     */    public CronTask() {    }    /**     * Selects the initial parameters for the task. As a task is created loaded     * dinamically from the class name, the default constructor called is     * the one with no arguments. You should call this method after creating     * the new instance of the task.     * @param cront The Crontab that creates and executes this task. It      * should be used to have access to other tasks, in order to wait for them     * or other tasks operations.     * @param iTaskID Identifier of the task     * @param strExtraInfo Extra information given to the task when created     */    public final void setParams(Crontab cront, int iTaskID,                                 String strClassName, String strMethodName,                                 String[] strExtraInfo) {        crontab = cront;        identifier = iTaskID;        this.strExtraInfo = strExtraInfo;        this.strMethodName = strMethodName;        this.strClassName = strClassName;    }    /**     * Returns the aditional parameters given to the task in construction     * @return The aditional parameters given to the task in construction     */    protected final String[] getExtraInfo() {        return strExtraInfo;    }    /**     * Returns the Method Name given to the task in construction     * @return The aditional parameters given to the task in construction     */    protected final String getMethodName() {        return strMethodName;    }    /**     * Runs this task. This method does the whole enchilada.     * This method decides wich method call in  the given class     */    public void runTask() {            try {            // Do class instantiation first (common to all cases of 'if' below)            Class cl = CronTask.class.getClassLoader().loadClass(strClassName);                        // Check if we have a Method            if (!("".equals(strMethodName))) {                try {                    Class[] argTypes = {String[].class};                    Object[] arg = {strExtraInfo};                    // accessing the given method                    try {                        Method mMethod = cl.getMethod(strMethodName, argTypes);                        mMethod.invoke(null, arg);                    } catch (NoSuchMethodException e) {                        // If its not a method meaybe is a Constructor                        try {                            Constructor con = cl.getConstructor(argTypes);                            runnable = (Runnable)con.newInstance(arg);                        } catch (NoSuchMethodException e2) {                            // Well maybe its not a method neither a constructor                            // Usually this code will never run                            // but?                            runnable = (Runnable)cl.newInstance();                        }                        runnable.run();                    }                    // let's catch Throwable its more generic                } catch (Exception e) {                    Log.error(e.toString(), e);                }                // No method given            } else {                try {                    Class[] argTypes = {String[].class};                    Object[] arg = {strExtraInfo};                    // lets try with main()                    try {                        Method mMethod = cl.getMethod("main", argTypes);                        mMethod.invoke(null, arg);                    } catch (NoSuchMethodException et) {                        try {                            // If its not a method meaybe is a Constructor                            Constructor con = cl.getConstructor(argTypes);                            runnable = (Runnable)con.newInstance(arg);                        } catch (NoSuchMethodException e2) {                            // Well maybe its not a method neither a constructor                            // Usually this code will never run                            // but?                            runnable = (Runnable)cl.newInstance();                        }                        runnable.run();                    }                } catch (Exception e) {                    Log.error(e.toString(), e);                }            }        } catch (Exception e) {            // This code was sended by             if (strMethodName != null && strMethodName.length() > 0) {                Log.info("Unable to instantiate class '" + strClassName                         + "', trying as Stateless Session EJB");                try {                    // Use default initial context                    InitialContext ic = new InitialContext() ;                     EJBHome home = (EJBHome) ic.lookup(strClassName) ;                     // Stateless Session Beans MUST have create() method                    Method createMethod = home.getClass().getMethod("create", new Class[0]);                    EJBObject ejb = (EJBObject) createMethod.invoke(home, new Object[0]);                    Log.info("Invoking method: " + strMethodName                             + " with params:" + Arrays.asList(strExtraInfo));                    if (strExtraInfo.length == 1 && (strExtraInfo[0] == null                             || "null".equalsIgnoreCase(strExtraInfo[0]))) {                        Object[] arg = new Object[0];                        Class[] argTypes = new Class[0];                        Method method = ejb.getClass().getMethod(strMethodName, argTypes);                        method.invoke(ejb, arg);                                                        } else {                         Object[] arg = {strExtraInfo};                        Class[] argTypes = {String[].class};                        Method method = ejb.getClass().getMethod(strMethodName, argTypes);                        method.invoke(ejb, arg);                                    }                 } catch (Exception e2) {                    Log.error(e2.toString(), e2);                            }            } else {                 Log.error("Unable to instantiate class: " + strClassName, e) ;             }         }    }    /**     * Runs this task     */    public final void run() {        File tempFile = null;        try {            if (Crontab.getInstance().getProperty("org.jcrontab.SendMail.to") != null) {                tempFile = new File(strClassName).createTempFile("jcrontab",                                                                  ".tmp");                FileOutputStream fos = new FileOutputStream(tempFile);                PrintStream pstream = new PrintStream(fos);                System.setOut(pstream);            }            // Runs the task            runTask();            // Deletes the task from the crontab array            crontab.getInstance().deleteTask(identifier);            //This line sends the email to the config            if (Crontab.getInstance().getProperty("org.jcrontab.SendMail.to") 							!= null) {                SendMail sndm = new SendMail();                sndm.send(tempFile);                tempFile.delete();            }        } catch (Exception e) {            Log.error(e.toString(), e);        }    }}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲一区二区三区视频在线| 日韩高清国产一区在线| 一级精品视频在线观看宜春院| 秋霞成人午夜伦在线观看| 国产成a人亚洲| 91精品国产色综合久久不卡电影 | 欧洲av一区二区嗯嗯嗯啊| 精品国一区二区三区| 亚洲综合色在线| 成人综合在线视频| 精品美女一区二区| 日日摸夜夜添夜夜添精品视频 | 91丨九色丨国产丨porny| 日韩午夜电影av| 亚洲第一av色| 色综合咪咪久久| 国产日产精品1区| 精品亚洲免费视频| 在线免费观看日韩欧美| 综合久久久久综合| 国产成人av在线影院| 精品福利一区二区三区免费视频| 亚洲成人第一页| 欧美色窝79yyyycom| 一区二区三区四区在线| 波多野结衣的一区二区三区| 国产亚洲欧美一区在线观看| 精品一区二区三区视频| 日韩欧美国产午夜精品| 午夜精品视频一区| 欧美日韩视频在线第一区 | 欧美怡红院视频| 激情欧美一区二区三区在线观看| 欧美理论片在线| 亚洲成av人片在线| 欧美日韩免费高清一区色橹橹| 亚洲午夜电影在线| 欧美日韩精品免费| 免费视频一区二区| 日韩你懂的在线观看| 精品在线播放午夜| 久久久久久久久一| 成人h精品动漫一区二区三区| 日本一区二区高清| av资源站一区| 亚洲综合一区在线| 欧美精品一卡两卡| 极品少妇xxxx精品少妇| 亚洲精品在线免费播放| 国产91精品入口| 中文字幕一区二区三区四区不卡| av色综合久久天堂av综合| 亚洲人成精品久久久久久| 欧美性生交片4| 日韩精品成人一区二区三区| 精品国产亚洲一区二区三区在线观看| 国产综合色精品一区二区三区| 亚洲国产精品国自产拍av| 色一区在线观看| 免费观看在线综合| 国产精品毛片久久久久久久| 在线看国产一区二区| 日本sm残虐另类| 久久精品一区蜜桃臀影院| 99久久99久久久精品齐齐| 午夜精品爽啪视频| 久久久久久夜精品精品免费| 91农村精品一区二区在线| 午夜精品一区二区三区免费视频| 久久久影视传媒| 欧美在线免费观看视频| 激情综合五月婷婷| 一区二区欧美精品| 久久久久久一级片| 欧美性一区二区| 国产不卡视频在线播放| 亚洲成人免费电影| 国产精品美日韩| 日韩一区二区三区在线视频| 日韩三级视频中文字幕| zzijzzij亚洲日本少妇熟睡| 老司机精品视频在线| 亚洲欧美另类久久久精品| 精品福利二区三区| 欧美天堂亚洲电影院在线播放| 国产高清精品久久久久| 亚洲成人一区二区在线观看| 国产精品护士白丝一区av| 6080国产精品一区二区| 91网站最新地址| 黄色资源网久久资源365| 亚洲电影在线播放| 国产精品盗摄一区二区三区| 精品日韩在线观看| 欧美日韩美少妇| 97精品久久久久中文字幕 | 久久亚洲一级片| 欧美日本视频在线| 色欧美片视频在线观看在线视频| 国产精品一区二区久久不卡 | 亚洲欧洲精品成人久久奇米网| 欧美电影免费观看高清完整版在 | 暴力调教一区二区三区| 国产一区二区久久| 国内精品国产三级国产a久久 | 成人av影院在线| 捆绑调教美女网站视频一区| 日韩精品一卡二卡三卡四卡无卡| 亚洲乱码日产精品bd| 国产精品网站在线观看| 国产色一区二区| 久久精品亚洲精品国产欧美kt∨ | 久久精品国产精品亚洲综合| 午夜精品福利在线| 一区二区三区在线免费播放| 亚洲色图制服丝袜| 亚洲免费观看高清完整版在线| 亚洲色图20p| 亚洲视频每日更新| 夜夜操天天操亚洲| 亚洲一区在线观看网站| 亚洲电影一级片| 日韩精品成人一区二区三区| 青青草伊人久久| 久久精品国产秦先生| 韩国三级电影一区二区| 韩国欧美一区二区| 成人自拍视频在线| 99精品偷自拍| 欧美性大战xxxxx久久久| 欧美中文字幕一区| 91精品视频网| 久久综合资源网| 中文字幕一区av| 一区二区三区欧美在线观看| 性做久久久久久久免费看| 日韩国产欧美视频| 精品在线播放午夜| av不卡在线播放| 99精品国产视频| 欧美日韩精品二区第二页| 日韩一级视频免费观看在线| 久久久.com| 亚洲三级在线看| 日本在线观看不卡视频| 国产精品白丝jk白祙喷水网站| 99国产精品久久久久| 欧美日韩另类国产亚洲欧美一级| 精品粉嫩aⅴ一区二区三区四区| 国产精品午夜在线| 日韩电影一二三区| 成人性生交大合| 欧美在线不卡视频| 精品国内二区三区| 亚洲人成在线播放网站岛国| 日韩成人精品在线观看| 懂色av噜噜一区二区三区av| 欧美日韩国产美女| 国产欧美视频一区二区| 午夜天堂影视香蕉久久| 成人性生交大片免费看视频在线| 欧美精品亚洲二区| 国产精品乱码妇女bbbb| 日本不卡高清视频| 色综合激情五月| 久久久精品日韩欧美| 婷婷成人激情在线网| proumb性欧美在线观看| 精品盗摄一区二区三区| 亚洲精品第一国产综合野| 国产精品亚洲一区二区三区在线 | 26uuu色噜噜精品一区| 亚洲欧美日韩小说| 国产成人精品影视| 69久久99精品久久久久婷婷| 亚洲乱码国产乱码精品精的特点| 国产资源在线一区| 91精品视频网| 亚洲不卡在线观看| 91久久久免费一区二区| 亚洲国产精品黑人久久久| 韩国女主播一区二区三区| 欧美日韩不卡视频| 亚洲午夜久久久| 91香蕉视频在线| 亚洲私人黄色宅男| www.66久久| 《视频一区视频二区| 成人小视频免费在线观看| 久久看人人爽人人| 国产一区二区三区免费看| 日韩精品一区二区三区四区 | 中文字幕精品在线不卡| 久久99精品久久只有精品| 在线成人免费观看| 亚洲午夜精品在线| 精品视频在线免费看| 亚洲国产美国国产综合一区二区| 一本久久综合亚洲鲁鲁五月天| 国产精品毛片a∨一区二区三区|