/**
* 业务线程实现类
*/
public class OperationThread extends WorkThread {
public final static String threadName = "OperationThread";
private final long MAX_RUN_CYCLE = 200L;
/***
*
* @param group
* @param name
*/
public OperationThread(ThreadGroup group) {
super(group, threadName);
}
public void init()
{
alive = true;
}
/***
*
*/
public void doTask() {
//编写业务实现
UserInfo userInfo = null;
userInfo = UserInfoQueue.getUserInfoQBean();//取队列数据
System.out.println("name:"+userInfo.getUserName);
System.out.println("pwd:"+userInfo.getUserPwd);
}
}
java学习之路二、具体业务实现线程
最新推荐文章于 2024-01-09 09:03:23 发布