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

📄 wdscmonitorthread.java

📁 以前做的一个j2ee的项目
💻 JAVA
字号:
package gov.gdlt.ssgly.taxcore.taxblh.wdsc.yhswdsc;

import java.util.*;

public class WDSCmonitorThread extends Thread {
    private Vector threads;
    private int count = 0;
    private Vector data = new Vector(), tempVector = null;
    private boolean bOver = true;
    public WDSCmonitorThread() {
    }

    public WDSCmonitorThread(Vector thread) {
        threads = thread;
        count = threads.size();
    }

    public static void main(String[] args) {
        WDSCmonitorThread wdscmonitorthread = new WDSCmonitorThread();
    }
    public void run() {

    }

    public Vector getVectorData() throws InterruptedException {
        WDSCyhsxxThread tempThread = null;
        while (bOver) {
            bOver = false;
            this.sleep(2);
            for (int i = 0; i < count; i++) {
                tempThread = (WDSCyhsxxThread)threads.get(i);
                if (tempThread.isIsOver()) {
                    tempVector = tempThread.getVector();
                    if (tempVector != null) {
                        int c = tempVector.size();
                        for (int j = 0; j < c; j++) {
                            data.add(tempVector.get(j));
                        }
                        tempThread.setVector(null);
                    }
                } else {
                    bOver = true;
                }
            }
        }
        return data;
    }

    public Vector getData() {
        return data;
    }

    public Vector getTempVector() {
        return tempVector;
    }

    public int getCount() {
        return count;
    }

    public Vector getThreads() {
        return threads;
    }


    public void setData(Vector data) {
        this.data = data;
    }

    public void setTempVector(Vector tempVector) {
        this.tempVector = tempVector;
    }

    public void setCount(int count) {
        this.count = count;
    }

    public void setThreads(Vector threads) {
        this.threads = threads;
    }
}

⌨️ 快捷键说明

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