1 23 24 package com.rift.coad.lib.thread; 26 27 import com.rift.coad.lib.security.UserSession; 28 29 30 35 public class CoadunationThread extends BasicThread { 36 37 41 public CoadunationThread() throws Exception { 42 } 43 44 45 52 public CoadunationThread(BasicRunnable runnable) throws Exception { 53 super(runnable); 54 } 55 56 57 60 public void start() throws IllegalThreadStateException { 61 throw new IllegalThreadStateException ("Cannot user this method use" + 62 " start(Username) instead"); 63 } 64 65 66 72 public void start(String username) throws IllegalThreadStateException { 73 try { 74 ThreadGroupManager.getInstance().addThreadToGroup(this,username); 75 super.start(); 76 } catch (Exception ex) { 77 throw new IllegalThreadStateException ( 78 "Failed to start the thread : " + ex.getMessage()); 79 } 80 } 81 } 82 | Popular Tags |