public void run() { LOGGER.log(Level.FINE, "Starting network stage thread [{0}]", getName()); while (true) { try { work(); if (!running) { LOGGER.log(Level.FINE, "Network stage thread [{0}] was stopped successfully", getName()); break; } } catch (Throwable t) { if (running) { LOGGER.log(Level.SEVERE, "Exception in network stage thread [" + getName() + "]:", t); } else { LOGGER.log(Level.FINE, "Network stage thread [{0}] was stopped successfully", getName()); LOGGER.log(Level.FINER, " stopped at:", t); break; } } } }
public void run() { LOGGER.log(Level.FINE, "Starting network stage thread [{0}]", getName()); while (true) { try { work(); if (!running) { LOGGER.log(Level.FINE, "Network stage thread [{0}] was stopped successfully", getName()); break; } } catch (Throwable t) { if (running) { LOGGER.log(Level.SEVERE, "Exception in network stage thread [" + getName() + "]:", t); } else { LOGGER.log(Level.FINE, "Network stage thread [{0}] was stopped successfully", getName()); LOGGER.log(Level.FINER, " stopped at:", t); break; } } } }
/** * Instantiates a new worker. * * @param name the name */ private NetworkStageThread(String name) { super(name); setDaemon(true); }
/** * Instantiates a new worker. * * @param name the name */ protected NetworkStageThread(String name) { super(ELEMENTS_THREAD_GROUP, name); setDaemon(true); }