1 16 17 package de.schlichtherle.key.passwd.swing; 18 19 import java.util.logging.*; 20 21 29 public class KeyMgmtLifeCycleThread extends Thread { 30 31 private static final Logger logger 32 = Logger.getLogger(KeyMgmtLifeCycleThread.class.getName()); 33 34 private final KeyMgmtLifeCycle rlc; 35 36 public KeyMgmtLifeCycleThread(final String id) { 37 this(new KeyMgmtLifeCycle(id)); 38 } 39 40 public KeyMgmtLifeCycleThread(KeyMgmtLifeCycle rlc) { 41 super(rlc, "Key Management Life Cycle Thread for \"" + rlc.id + "\""); 42 this.rlc = rlc; 43 } 46 47 public String getResourceID() { 48 return rlc.id; 49 } 50 51 55 public Throwable getThrowable() { 56 return rlc.throwable; 57 } 58 59 public void start() { 60 logger.fine(rlc.id + ": Starting Key Management Life Cycle Thread..."); 61 super.start(); 62 } 63 64 public void run() { 65 super.run(); 66 final Throwable t = getThrowable(); 67 if (t != null) 68 t.printStackTrace(); 69 } 70 } | Popular Tags |