WorkerTask
218219220221222223224225226227
* @param name * the new thread name. * @since 1.6 */ public void setThreadName(String name) { WorkerTask lt = listener; if (lt instanceof Thread) { ((Thread)lt).setName(name); } }
120121122123124125126127128129130131132133134135136
* * @throws IOException */ public void close() throws IOException { boolean interrupted = false; WorkerTask l = listener; if (l != null) { l.terminate(); l.interrupt(); if (socketTimeout > 0) { try { l.join(); } catch (InterruptedException ex) { interrupted = true; logger.warn(ex); }
185186187188189190191192193194
* the new priority. * @see Thread#setPriority * @since 1.2.2 */ public void setPriority(int newPriority) { WorkerTask lt = listener; if (lt instanceof Thread) { ((Thread)lt).setPriority(newPriority); } }
199200201202203204205206207208209
* a value between {@link Thread#MIN_PRIORITY} and * {@link Thread#MAX_PRIORITY}. * @since 1.2.2 */ public int getPriority() { WorkerTask lt = listener; if (lt instanceof Thread) { return ((Thread)lt).getPriority(); } else { return Thread.NORM_PRIORITY;
231232233234235236237238239240241
* @return * the thread name if in listening mode, otherwise <code>null</code>. * @since 1.6 */ public String getThreadName() { WorkerTask lt = listener; if (lt instanceof Thread) { return ((Thread)lt).getName(); } else { return null;
127128129130131132133134135136
* the new priority. * @see Thread#setPriority * @since 1.2.2 */ public void setPriority(int newPriority) { WorkerTask st = server; if (st instanceof Thread) { ((Thread)st).setPriority(newPriority); } }
141142143144145146147148149150151
* a value between {@link Thread#MIN_PRIORITY} and * {@link Thread#MAX_PRIORITY}. * @since 1.2.2 */ public int getPriority() { WorkerTask st = server; if (st instanceof Thread) { return ((Thread)st).getPriority(); } else { return Thread.NORM_PRIORITY;
160161162163164165166167168169
* @param name * the new thread name. * @since 1.6 */ public void setThreadName(String name) { WorkerTask st = server; if (st instanceof Thread) { ((Thread)st).setName(name); } }
173174175176177178179180181182183
* @return * the thread name if in listening mode, otherwise <code>null</code>. * @since 1.6 */ public String getThreadName() { WorkerTask st = server; if (st != null) { return ((Thread)st).getName(); } else { return null;