1 21 package org.jsmtpd.generic.threadpool; 22 23 27 public class DummyThread implements IThreadedClass { 28 29 private String prm = "nada"; 30 31 public void doJob() { 32 System.out.println("DummyTh working " + Thread.currentThread().getId() + " with param " + prm); 33 34 Thread.currentThread().setPriority(Thread.MIN_PRIORITY); 35 37 49 try { 50 Thread.sleep(500); 51 } catch (InterruptedException e) { 52 e.printStackTrace(); 53 } 54 System.out.println("DummyTh end" + Thread.currentThread().getId()); 55 } 56 57 60 public void forceShutdown() { 61 62 } 63 64 67 public void gracefullShutdown() { 68 69 } 70 71 74 public void setParam(Object o) { 75 prm = (String ) o; 76 77 } 78 79 } | Popular Tags |