⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 boardloadthread.java

📁 反ajax原代码
💻 JAVA
字号:
// Decompiled by Jad v1.5.7g. Copyright 2000 Pavel Kouznetsov.
// Jad home page: http://www.geocities.com/SiliconValley/Bridge/8617/jad.html
// Decompiler options: packimports(3) fieldsfirst ansi 
// Source File Name:   BoardLoadThread.java

package com.laoer.bbscs.sys;

import com.laoer.bbscs.business.service.BoardList;
import javax.servlet.ServletContext;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.web.context.WebApplicationContext;
import org.springframework.web.context.support.WebApplicationContextUtils;

// Referenced classes of package com.laoer.bbscs.sys:
//            SysInfo

public class BoardLoadThread extends Thread
{

    private static final Log logger;
    public static BoardLoadThread instance;
    private boolean isRun;
    WebApplicationContext wac;
    static Class class$com$laoer$bbscs$sys$BoardLoadThread; /* synthetic field */

    public static synchronized BoardLoadThread getInstance(ServletContext sc)
    {
        if(instance == null)
            instance = new BoardLoadThread(sc);
        return instance;
    }

    public BoardLoadThread()
    {
        isRun = true;
    }

    public BoardLoadThread(ServletContext sc)
    {
        isRun = true;
        wac = WebApplicationContextUtils.getRequiredWebApplicationContext(sc);
    }

    public void run()
    {
        BoardList boardList = (BoardList)wac.getBean("boradList");
        if(SysInfo.getInstance().getBoardthread() > 0)
        {
            do
            {
                if(!isRun)
                    break;
                try
                {
                    BoardLoadThread _tmp = this;
                    sleep(SysInfo.getInstance().getBoardthread() * 60 * 1000);
                    logger.info("Load board info.....");
                    boardList.load();
                }
                catch(InterruptedException ex)
                {
                    logger.error(ex);
                    return;
                }
            } while(true);
            logger.info("board load thread stop");
            return;
        } else
        {
            logger.info("No board load thread");
            return;
        }
    }

    public boolean isIsRun()
    {
        return isRun;
    }

    public void setIsRun(boolean isRun)
    {
        this.isRun = isRun;
    }

    static Class class$(String x0)
    {
        return Class.forName(x0);
        ClassNotFoundException x1;
        x1;
        throw new NoClassDefFoundError(x1.getMessage());
    }

    static 
    {
        logger = LogFactory.getLog(class$com$laoer$bbscs$sys$BoardLoadThread != null ? class$com$laoer$bbscs$sys$BoardLoadThread : (class$com$laoer$bbscs$sys$BoardLoadThread = class$("com.laoer.bbscs.sys.BoardLoadThread")));
    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -