public class sendAutoServer extends HttpServlet{
private static final long serialVersionUID = 8398634860666661954L;
// private static Logger logger = Logger.getLogger(CLS_Business_Ms.class);
public void init(ServletConfig cfg) throws ServletException {
super.init(cfg);
sendAutoThread sthread = new sendAutoThread();
sthread.start();
//ReceiveServer server =new ReceiveServer();
}
}
public class sendAutoThread extends Thread {
boolean isrun = true;
public void run(){
while(isrun){
//do something;
}
}
}
本文介绍了如何使用Java实现一个发送自动服务线程,通过创建并启动线程来执行特定任务,实现自动化发送操作。
3158

被折叠的 条评论
为什么被折叠?



