/** * Checks whether the network thread is initialized and running. * * @return <code>true</code> if the network thread is running, <code>false</code> otherwise */ public boolean isNetworkThreadRunning() { boolean isSocketThreadInitialized = socketServerThread != null && socketServerThread.isAlive(); boolean isSocketServerRunning = connectionHandler != null && connectionHandler.isRunning(); return isSocketThreadInitialized && isSocketServerRunning; }